# Twitch connection\_scope

**URL:** <https://community.auth0.com/t/twitch-connection-scope/75557>\
**Category:** Get Help\
**Tags:** social-connections\
**Created:** [December 28, 2021, 5:58pm UTC](https://community.auth0.com/t/twitch-connection-scope/75557 "2021-12-28T17:58:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![noobpanda](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@noobpanda](https://community.auth0.com/u/noobpanda)\
**Post date:** [December 28, 2021, 5:58pm UTC](https://community.auth0.com/t/twitch-connection-scope/75557/1 "2021-12-28T17:58:09Z")

</div>

Hello,  
I’m using the Twitch social connection and it works fine.  
Following the advice [here](https://community.auth0.com/t/pass-additional-scopes-permissions-to-a-social-connection/56103) I’m passing `connection_scope: 'clips:edit'`.  
It generates a request that reads `scope=clips:edit,user:edit user:read:email` (after decode).  
Twitch expects the scopes to be space separated but the library concats the connection\_scope with a comma.  
Any way to workaround this?  
Thank you

---

<div class="post-metadata">

**Author:** ![marek.zgraja](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/marek.zgraja/32/33197_2.png) [@marek.zgraja](https://community.auth0.com/u/marek.zgraja)\
**Post date:** [September 19, 2022, 12:53pm UTC](https://community.auth0.com/t/twitch-connection-scope/75557/2 "2022-09-19T12:53:42Z")

</div>

Hi, did you find the workaround?

---

<div class="post-metadata">

**Author:** ![sendingstoneapp](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sendingstoneapp/32/41701_2.png) [@sendingstoneapp](https://community.auth0.com/u/sendingstoneapp)\
**Post date:** [December 4, 2022, 8:13pm UTC](https://community.auth0.com/t/twitch-connection-scope/75557/3 "2022-12-04T20:13:51Z")

</div>

+1 this seems like a bug in Auth0. @nicolas_sabena Can you please comment?

---

<div class="post-metadata">

**Author:** ![sendingstoneapp](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sendingstoneapp/32/41701_2.png) [@sendingstoneapp](https://community.auth0.com/u/sendingstoneapp)\
**Post date:** [December 4, 2022, 9:01pm UTC](https://community.auth0.com/t/twitch-connection-scope/75557/4 "2022-12-04T21:01:55Z")

</div>

I found a workaround that (unfortunately) involves creating a custom social connection. See the pictured set up to configure Twitch’s OAuth URLs and use a space separated value for “Scope”. Here’s the fetchUserProfile script I’m using:

```auto
function fetchUserProfile(accessToken, ctx, callback) {
  request.get(
    {
      url: 'https://api.twitch.tv/helix/users',
      headers: {
        'Authorization': 'Bearer ' + accessToken,
        'Client-Id': ctx.options.client_id
      }
    },
    (err, resp, body) => {
      if (err) return callback(err);
      if (resp.statusCode !== 200) return callback(new Error(body));
      let bodyParsed;
      try {
        bodyParsed = JSON.parse(body);
      } catch (jsonError) {
        return callback(new Error(body));
      }
      const profile = bodyParsed.data[0];
      callback(null, profile);
    }
  );
}

```

 ![Screen Shot 2022-12-04 at 3.59.35 PM](https://global.discourse-cdn.com/auth0/original/3X/d/2/d201d46ddc3580675d322998b3859a7a53153e3b.png)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [December 18, 2022, 9:02pm UTC](https://community.auth0.com/t/twitch-connection-scope/75557/5 "2022-12-18T21:02:10Z")

</div>

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