EBS access token and GET helix/channels?broadcaster_id= enpoint

As part of my extension functionality i need to get the streamer delay.
I tested the endpoint with my EBS JWT and it didnt work, i tried signing with the shared secret and my ext secret and the request failed, i only got that endpoint to work with my user twitch access token.

Am i missing something or do i need to generate a token and manage the refresh in my ebs?
If so How do i generate an access token programmatically for my eds?

  • Do you mean

The viewers each individual delay to the stream content (ignoring Streaming software/Get Channel Info delay)

hlsLatencyBroadcaster from onContext - Extensions Reference | Twitch Developers

  • Or do you mean

The delay from Get Channel Info - Reference | Twitch Developers

You can only get the delay from Get Channel Info, using an oAuth token provided by the streamer. So you would need to ask the broadcaster to (re)authenticate outside of the Twitch Extension hosted on Twitch, in order to grant this permission, IE an oAuth flow on your server. Which is what I do for “free cost” EventSub for my extensions, example:

This button goes to my server (the same one where the EBS is) and runs an oAuth flow. I don’t store the result token since I don’t need it I just spool up eventsubs

An Extension JWT nor an Extension helixToken is an appropriate authentication method here for this endpoint since neither represent the broadcaster

  • or do you mean

The delay set in the streaming software by the streamer

There is no way to get that via the Twitch API(s)


The optimal approach for an extension is just to use hlsLatencyBroadcaster theres no real need to get the streaming delay, since in 99% of cases, streamers do not use the functionality, unless streamers are involved with a competition that requires it, and then every streamer should be using the same delay and you can hard code that on the EBS side.

And in cases where you need it, it’s more benefial to ask the user what their delay is and let them set it in the config view, then this accounts for all kinds of streamer delaying video. (Either in software or in Twitch)

Thanks, i was under the impression twitch also allow u to set a delay from within its interface and thats what the delay in get channel meant.

Thats delay people pratically never used except when required for competitions.

But that is the delay returned from Get Channel Info.

The issues however is that if a streamer needs to delay for any reason they’ll usually do it in their streaming software instead and thats not API’ed since Twitch doesn’t need to know.

So if you need to delay events you need a config control so the streamer can specify.

And then you’ll probably want to take that value and and add hlsLatencyBroadcaster to it to delay your events accordingly.

But I think just using hlsLatencyBroadcaster should do the trick client side for 99% of use cases.