User follows new api

Hi all,
I am writing a new chat bot and would like it to work with the new api from day one.

Recently I tried to implement the user/follows api in the bot.
The maximum number of results in one request is 100 and there is a cursor string for the next results in a multi page response. But how can I know that I reached the last page of results? Should I count it in the app or should this api be updated?

Another question is that this request is only returning the id’s of the following users. Is there any way this request will return additional data of users, names for example? Or my only option is to request the twitch name for each id?

Thanks in advance for your help.
Sorry for the bad English.

I’m fairly certain you’ll get a Total property that you can use to compare against the number of follows you’ve fetched thus far. Once you have fetched a number of follower equivalent to the returned “Total” count, you’re done.

You’ll probably want to hit the Users endpoint to get usernames. Something like this:
You can do up to 100 at a time.

You should check the response code after making the Twitch API request. Generally you will receive a response code that is 200 OK with good data, but when there is any kind of error you will receive something else. It will likely be a 400 BAD REQUEST error.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.