Any code examples with using implicit auth with jQuery calls?

Been looking at this:

New API Helix requirements are a pain and a headache. Why simple API calls need PER user login/authorization is beyond me. API calls should be simple and easy. Pass in your approved access token and you’re good to go.

But enough complaining…

I have a very simple client side script that I want to implicit oauth to just get current viewer count of any given channel I pass in.

I currently use a simple php and jquery to accomplish this on the old API and it works wonders.

Are there any code examples for how one might accomplish this with the new oauth method in jQuery?

I don’t have a server, i am not setting one up, i am not writing any server to server code to do the oauth. I don’t have a cron job, nothing.

Simple client side script, I don’t want to have to user login to twitch everytime just to get a simple number from a twitch stream…what are my options?

Pure Javascript using fetch example of implicit auth with a demo.

There are no options to solve the issue as you describe, you need to use a token, if you can’t login or don’t want to then you don’t have a solution without using a server to relay the calls to Twitch and/or caching the results from Twitch to a avoid unnecessary requests. (and/or using Webhooks to negate even more calls)

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