# authorizationParams doesn't work to give scope access on login for twitter only

**URL:** <https://community.auth0.com/t/authorizationparams-doesnt-work-to-give-scope-access-on-login-for-twitter-only/150438>\
**Category:** Get Help\
**Tags:** login-experience, new-universal-login-experience\
**Created:** [October 24, 2024, 6:49pm UTC](https://community.auth0.com/t/authorizationparams-doesnt-work-to-give-scope-access-on-login-for-twitter-only/150438 "2024-10-24T18:49:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![koppeks](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/koppeks/32/61633_2.png) [@koppeks](https://community.auth0.com/u/koppeks)\
**Post date:** [October 24, 2024, 6:49pm UTC](https://community.auth0.com/t/authorizationparams-doesnt-work-to-give-scope-access-on-login-for-twitter-only/150438/1 "2024-10-24T18:49:23Z")

</div>

I have been trying to find a way to give access to write posts to an auth0 login user with Twitter. But unable to find a solution in the docs/AI/ or forums.

The request is done with handleAuth and adding extra customParams to the handleLogin:

```auto
import { handleAuth, handleLogin } from "@auth0/nextjs-auth0";

export const GET = handleAuth({
  login: async (req, res) => {
    try {
      return await handleLogin(req, res, {
        authorizationParams: {
          connection_scope: 'openid profile email tweet.write tweet.read users.read'
        }
      });
    } catch (error) {
      return new Response("error");
    }
  }
});

```

 ![image](https://global.discourse-cdn.com/auth0/original/3X/6/a/6ac4dbcb68ebb93a37b24ef4552c27c46575f634.png)

I will be using both login access (Twitter and Google) to test the reach of the handleLogin authorizationParams with the scopes `tweet.write tweet.read users.read` that are needed to create posts on behalf of users that are logged in the platform.

Trying this with a Twitter login will return this screen, only asking for profile access and ignoring the scopes from Twitter inside `connection_scope`.  
 ![image](https://global.discourse-cdn.com/auth0/original/3X/a/8/a83f68cab39d058eb4d3ef90353869fcc710d9df.png)

The odd thing is that if I try to access with the exact same scope in other social platforms, for example, google. The scope is correctly added to the request, throwing an error for those invalid scopes.

 ![image](https://global.discourse-cdn.com/auth0/original/3X/0/9/09de19c86538b7864e9a5b80d11f71f9976cc7cf.png)

_**Some requested scopes were invalid. {valid=[openid, [https://www.googleapis.com/auth/userinfo.profile](https://www.googleapis.com/auth/userinfo.profile), [https://www.googleapis.com/auth/userinfo.email](https://www.googleapis.com/auth/userinfo.email)], invalid=[tweet.read, users.read, tweet.write]}**  
 **Error 400: invalid\_scope** _

Asking for more permissions is even possible from auth0?  
I didn’t find anywhere in the platform docs that will clarify this.

---

<div class="post-metadata">

**Author:** ![koppeks](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/koppeks/32/61633_2.png) [@koppeks](https://community.auth0.com/u/koppeks)\
**Post date:** [October 25, 2024, 3:01am UTC](https://community.auth0.com/t/authorizationparams-doesnt-work-to-give-scope-access-on-login-for-twitter-only/150438/2 "2024-10-25T03:01:07Z")

</div>

Currently I made some progress on expanding on the permissions using this method:

[https://dev-edcjdzfq4hld0akq.us.auth0.com/authorize?response\_type=code&client\_id=client\_id&code\_challenge=E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM&code\_challenge\_method=S256&redirect\_uri=http://localhost:3000/api/auth/callback&scope=openid+profile+photo+tweet.write+offline\_access&state=m2X2AOm8vwoEkQsYNKxCFmKTduvuu7iJbeWbBIlYAss](https://dev-edcjdzfq4hld0akq.us.auth0.com/authorize?response_type=code&client_id=client_id&code_challenge=E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM&code_challenge_method=S256&redirect_uri=http://localhost:3000/api/auth/callback&scope=openid+profile+photo+tweet.write+offline_access&state=m2X2AOm8vwoEkQsYNKxCFmKTduvuu7iJbeWbBIlYAss)

Using this endpoint and replacing client\_id with the actual environment Auth0\_Client\_id. The result being that now the access ask for offline\_access but ignores tweet.write:

 ![image](https://global.discourse-cdn.com/auth0/original/3X/d/c/dc7fb9587ec9670e81ebc63704af23e956bf4228.png)

I still have the same question. Is this even possible? Looks like the endpoint is ignoring all the tweet.somescope

Can someone help me with this?

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [November 23, 2024, 12:48am UTC](https://community.auth0.com/t/authorizationparams-doesnt-work-to-give-scope-access-on-login-for-twitter-only/150438/5 "2024-11-23T00:48:06Z")

</div>

Hi @koppeks,

Thanks for reaching out to the Auth0 Community!

Yes, it is possible to request for more permissions in the context of the scopes for Twitter.

For this scenario, you will need to include both the `connection` and `connection_scope` query parameters in your login request.

For example:

```auto
  return await handleLogin(req, res, {
    authorizationParams: {
      scope: 'openid profile email offline_access',
      connection: 'twitter',
      connection_scope: 'tweet.write tweet.read users.read'
    }

```

Let me know if you continue have issues with this.

Thanks,  
Rueben

---

<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 7, 2024, 12:49am UTC](https://community.auth0.com/t/authorizationparams-doesnt-work-to-give-scope-access-on-login-for-twitter-only/150438/6 "2024-12-07T00:49:00Z")

</div>

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