Multitool Twitch API – Beta Configuration
I’ve been working on Kraken – the Twitch API. I’m releasing the early work to make it easier for testing and feedback. I’ve made the bold move of naming the plugin, “TwitchPress” and used the Twitch logo in some graphics to help people easily identify the project as being Twitch related. However despite making it clear wherever I can, that the project is not affiliated with Twitch Entertainment, Inc. It may still not be accepted and so what I type here is, that early.
This is an early post regarding the configuration of Twitch in the plugin for the purpose of testing only. I recommend reading the Twitch Developer terms & conditions before using anything with the Twitch API in it. If you understand your responsibilities you will also understand that a plugin of this nature cannot just be plugged into your WP to provide services to other users, within an hour, without risk. By installing Multitool and configuring Twitch you are considered to be the “Developer”. It’s nothing to do with a job title, it’s about responsibility and you will take on liability by providing services with this plugin without knowing what you are doing. So on the note, I’m not even going to explain how to use the plugin to provide services to other users of your site but I will explain how to use it for personal use.
Using the plugin for personal use only and access your own Twitch account only within your service. That carries less liability but at this stage in the project, considering it was created October 2016 and I’m typing this in the same month. I suggest you only test with the plugin or use it locally or adapt it further or wait for further updates.
Register Developer Application
The first thing you need to do is get API credentials for what will be your application. It’s your site so your copy of Multitool (or my Twitch plugin) is your own application. Go to https://www.twitch.tv/kraken/oauth2/clients/new
The credentials you are giving are serious. I stress this for those of you who are not developers. You should still read developer terms because they do apply to everyone.
Twitch Class Configuration Option A
You can add your credentials to the plugins file. Open /plugins/Multitool/lib/Twitch/twitchapi3.php and paste your applications API access where applicable.
Twitch Class Configuration Option B
Your second option is safer but it is still recommended for a developer environment until encryption is on offer. Enter the application key and secret into the WordPress options table. Do it as shown in the image below, changing “multitool” to “twitchpress” if your using the new TwitchPress plugin. Please note that steps to increase security are already on the projects task list.