# EBS Auth & client credentials

**URL:** <https://discuss.dev.twitch.com/t/ebs-auth-client-credentials/13620>\
**Category:** Extensions\
**Created:** [January 11, 2018, 10:23am UTC](https://discuss.dev.twitch.com/t/ebs-auth-client-credentials/13620 "2018-01-11T10:23:17Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kimau](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/kimau/32/2216_2.png) [@Kimau](https://discuss.dev.twitch.com/u/Kimau)\
**Post date:** [January 11, 2018, 10:23am UTC](https://discuss.dev.twitch.com/t/ebs-auth-client-credentials/13620/1 "2018-01-11T10:23:17Z")

</div>

Is the extension client ID and secret valid for an EBS server to perform client\_credentials oauth flow?

I’m recieving invalid secret message. I only need it for the live extension call which requires Auth token (undocumented)

Another undocumented or unclear point fyi is that the Auth endpoint requires the client ID both in the uri and headers

Code: [https://github.com/Kimau/twitch\_variety/blob/master/twitch.go#L66](https://github.com/Kimau/twitch_variety/blob/master/twitch.go#L66)

Thanks

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [January 11, 2018, 4:16pm UTC](https://discuss.dev.twitch.com/t/ebs-auth-client-credentials/13620/2 "2018-01-11T16:16:55Z")

</div>

> [@Kimau](#):
>
> Is the extension client ID and secret valid for an EBS server to perform client\_credentials oauth flow?

No

 ![image](https://d2opxh93rbxzdn.cloudfront.net/original/2X/9/9b3d62c3fbe22647957b37b012c6187d9ff0001c.png)

Manage your extension, go to Settings, on that extension (not inside a version) and you can set the RedirectURI and reset/obtain ClientSecret for oAuth token exchange

---

<div class="post-metadata">

**Author:** ![Kimau](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/kimau/32/2216_2.png) [@Kimau](https://discuss.dev.twitch.com/u/Kimau)\
**Post date:** [January 11, 2018, 6:07pm UTC](https://discuss.dev.twitch.com/t/ebs-auth-client-credentials/13620/3 "2018-01-11T18:07:49Z")

</div>

Bugger. Thanks.

FYI Use case is to track usage of the extension via

> **[Reference](https://dev.twitch.tv/docs/extensions/reference#get-live-channels-with-extension-activated)**
>
> Twitch Developer tools and services to integrate Twitch into your development or create interactive experience on twitch.tv.

But that requires user auth. Seems like an oversight. As EBS is highly likely to want to tick that in a NON-user specific case.

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [January 11, 2018, 6:24pm UTC](https://discuss.dev.twitch.com/t/ebs-auth-client-credentials/13620/4 "2018-01-11T18:24:56Z")

</div>

> [@Kimau](#):
>
> FYI Use case is to track usage of the extension

> [@Kimau](#):
>
> But that requires user auth.

No… It only requires ClientID.

> curl -H “Client-Id: pxifeyz7vxk9v6yb202nq4cwsnsp1t” [https://api.twitch.tv/kraken/extensions/uddfpjpm83bcj33vmxkyzf7m55o20q/live\_activated\_channels?api\_version=5](https://api.twitch.tv/kraken/extensions/uddfpjpm83bcj33vmxkyzf7m55o20q/live_activated_channels?api_version=5)

Works fine.

Thats the ClientID from the docs and my ExtensionID. (But forcing API version via Query string)

> curl -H “Client-Id: pxifeyz7vxk9v6yb202nq4cwsnsp1t” [https://api.twitch.tv/kraken/extensions/uddfpjpm83bcj33vmxkyzf7m55o20q/live\_activated\_channels](https://api.twitch.tv/kraken/extensions/uddfpjpm83bcj33vmxkyzf7m55o20q/live_activated_channels)

Should result in a 404:

> {“error”:“Not Found”,“status”:404,“message”:“”}

If you are using this end point make sure to set

> Accept: application/vnd.twitchtv.v5+json

as a cURL header.

I envisage you are getting a 404 error not a 403 as a response?

---

<div class="post-metadata">

**Author:** ![Kimau](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/kimau/32/2216_2.png) [@Kimau](https://discuss.dev.twitch.com/u/Kimau)\
**Post date:** [January 12, 2018, 12:07am UTC](https://discuss.dev.twitch.com/t/ebs-auth-client-credentials/13620/5 "2018-01-12T00:07:39Z")

</div>

I just tried that on my own channel tonight as a test while I streamed and it was still returning  
{“channels”:[]}

Does the extension need to be in a certain stage of deployment to register? It’s live on my channel as a test and I’m getting traffic from it. That endpoint is just returning empty array.

---

<div class="post-metadata">

**Author:** ![dhQk](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/dhqk/32/3386_2.png) [@dhQk](https://discuss.dev.twitch.com/u/dhQk)\
**Post date:** [January 12, 2018, 12:16am UTC](https://discuss.dev.twitch.com/t/ebs-auth-client-credentials/13620/6 "2018-01-12T00:16:09Z")

</div>

it takes 5-10 minutes from stream up/down for changes to propagate to this endpoint. wait a while and try after going live

---

<div class="post-metadata">

**Author:** ![Kimau](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/kimau/32/2216_2.png) [@Kimau](https://discuss.dev.twitch.com/u/Kimau)\
**Post date:** [January 12, 2018, 9:09am UTC](https://discuss.dev.twitch.com/t/ebs-auth-client-credentials/13620/7 "2018-01-12T09:09:34Z")

</div>

I was hitting the endpoint once a minute over a 3 hour stream. With both myself and one of my mods able to see the extension. Additionally normal traffic from the extension was coming through to the EBS.

Also my misunderstanding it needing about OAuth for this endpoint @BarryCarlyon was from your response here [Live\_channels is always empty](https://discuss.dev.twitch.com/t/live-channels-is-always-empty/11943/2)

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [January 12, 2018, 12:22pm UTC](https://discuss.dev.twitch.com/t/ebs-auth-client-credentials/13620/8 "2018-01-12T12:22:56Z")

</div>

> [@Kimau](#):
>
> @BarryCarlyon was from your response here Live\_channels is always empty

Ah turns out I was wrong but never went back to the post to revise.

I always call the endpoint with a me auth as it is

---

<div class="post-metadata">

**Author:** ![Kimau](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/kimau/32/2216_2.png) [@Kimau](https://discuss.dev.twitch.com/u/Kimau)\
**Post date:** [January 12, 2018, 6:42pm UTC](https://discuss.dev.twitch.com/t/ebs-auth-client-credentials/13620/9 "2018-01-12T18:42:56Z")

</div>

Any idea why my response is empty now?

If it doesn’t require Auth it should be working.

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [January 12, 2018, 7:03pm UTC](https://discuss.dev.twitch.com/t/ebs-auth-client-credentials/13620/10 "2018-01-12T19:03:38Z")

</div>

Define empty? No JSON at all? Or an empty object?

Do you test the HTTP Response code for a non 200?

---

<div class="post-metadata">

**Author:** ![Kimau](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/kimau/32/2216_2.png) [@Kimau](https://discuss.dev.twitch.com/u/Kimau)\
**Post date:** [January 12, 2018, 8:19pm UTC](https://discuss.dev.twitch.com/t/ebs-auth-client-credentials/13620/11 "2018-01-12T20:19:07Z")

</div>

> [@Kimau](#):
>
> {“channels”:}

As above even when the stream ran for 3 hours and I was receiving traffic from extension

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [January 13, 2018, 11:10am UTC](https://discuss.dev.twitch.com/t/ebs-auth-client-credentials/13620/12 "2018-01-13T11:10:42Z")

</div>

Hmm I wonder if the extension needs to be released instead of in development.

Not something I tested myself, I only use the end point to show a list of live people using the extension on my extension promo website

---

<div class="post-metadata">

**Author:** ![loffelmacher](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/loffelmacher/32/5352_2.png) [@loffelmacher](https://discuss.dev.twitch.com/u/loffelmacher)\
**Post date:** [October 28, 2018, 10:49pm UTC](https://discuss.dev.twitch.com/t/ebs-auth-client-credentials/13620/13 "2018-10-28T22:49:31Z")

</div>

Undocumented. Above you mention something that’s not documented. Is it all e undocumented?

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [October 29, 2018, 1:25am UTC](https://discuss.dev.twitch.com/t/ebs-auth-client-credentials/13620/14 "2018-10-29T01:25:32Z")

</div>

Not sure what you are referring to. You have necroed this thread…
