is there an upper limit on how many I can make? I’ve noticed I can add the parameter “&limit=100”. However, It doesn’t seem to effect the returned response.
If you’re requesting several hundred channels at once, you may also run into issues due to URL size. For polling >100 channels, it’ll be best practice to limit yourself to a max of 100 at a time, as while Kraken may allow you to put an unlimited number (up until it breaks URL size limits) and page through the results, that endpoint is deprecated and Helix limits you to 100 ID’s or Logins per request so you’d have to split it up into multiple requests anyway.
As Barry mentioned, Webhooks are also something to consider depending on your use case.
Thanks for getting back. I have a question regarding “setting the limit to 100 and then use offset of paginate the results”. What should of the offset be? Secondly, I noticed that I need to be using the new Twitch API to use web hooks however when I try a request it returns an error 401 saying that I need a valid client id or OAuth token. However, I’ve checked and it is the correct client ID of the application.
I’m sorry I don’t quite understand, I’m pretty new to this. I have been pasting the url into a browser to quickly see the Json. Can I not do that with the new API? and in my javascript file i’ve been using a fetch API request to get the Json data which uses a string with parameters. What should I be using with the new API ?
If you’re just going direct to the API endpoint in the browser, then in most cases without a browser extension to allow you to edit request headers you wont be able to do that with the new Helix API. For simple testing, a lot of people like Postman https://www.getpostman.com/ it’s a simple tool that’s free and lets you set headers and all that you’ll need.
As for using fetch if you check out the docs for it https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch and scroll to “Supplying request options” you’ll see that when making a fetch request, as well as a URL you can also provide an options object, one of the options you can set is the headers, in this case Client-ID