Hey I’ve been using the Twitch API for about a year now. More recently, I have been getting into work for partnered streamers and therefore many of the API calls I am performing require an authenticated partnered user to work. For instance, I built a simple page that displays a list of the authenticated users’ subscribers. However, the problem is that I have no way to test if my code actually works because I don’t have a partnered channel.
Is there some kind of “test channel” that I can authenticate on my site in order to test my applications?
Hi, wanted to know if there is way to get a test partnered account, started the development for an app for the current twitch/overwolf challenge, but I see I’m going to have trouble testing partnered features.
@fugiman it would also be great if subscribing to that channel was possible for free, with a free to define subscription date. Being able to unsubscribe would be a great touch too
If anyone needs to test their code, you could use www.pastebin.com
This might not be the best way to test if the code is working as it should be but if you are good at what you are doing then you should be fine.
Twitch API documentation on Github provides some examples of what should be returned when making a call to the API. You could copy this example and paste it into www.pastebin.com to create some “dummy data” and then use the raw url for the pasted file to read the data from the file. If your code works with this “dummy data” then it should work with the partnered channels.
The API doesn’t change much, if it does they release a new version so the old API still works but I agree that it would need to be maintained to make sure everything is up to date in case something does change.
Both in the partner category but also test account(s).
I am wondering if twitch has any intention of opening up the test_user1 or any other account. It would give developers an ability to create a “demo” user if they require a secondary login via twitch to grab, say the bio, the profile picture, if the user is partnered or the email. I know they could use their own, or use random data & bypass the secondary login for just that 1 account, I’m just asking.
E.g. my site checks if the user is partnered once they login and since the login stays active for 30 days and they could get partnered within that time, it also checks every time they update anything on their profile. With no valid oauth token it’ll throw an error that I have to write an exception for.
I notice this has been a while since last updated. I know this is what I need so I felt it was better to reply to this than to open an exact same thread again.
Has this been implemented? Or at least a way for developers to test partnered features? I’m using the Bits PubSub API and have no real way of working this without.
Edit: I noticed the link to test code to see if it works, but the problem is that I need a partner’s OAuth for this.
Also, all of the testing functionality you’re asking for can already be done by creating mock data based on the documentation and testing your code using that mock data.
I think that’s a terrible excuse. Why should the user have to reconstruct the Twitch API and keep it up to date with the existing API?
Also, what happens if a user has local or automated github tests that will pass with their test cases, but because the API had an update, it fails in production? It’s maybe fine if you’re doing a quick test locally, but it doesn’t work in faster or more long-term environments.
There’s no excuse for Twitch to not have a sandbox for their API. They are one of the largest companies on earth and hundreds of smaller companies can do it, so why can’t they?