# Got error auth\_url = ( f"https://app.hubspot.com/oauth/authorize" f"?client\_id={

**URL:** <https://community.hubspot.com/t/got-error-auth-url-f-https-app-hubspot-com-oauth-authorize-f-client-id/124602>\
**Category:** Marketplace Apps\
**Tags:** third-party-apps\
**Created:** [January 23, 2025, 6:58am UTC](https://community.hubspot.com/t/got-error-auth-url-f-https-app-hubspot-com-oauth-authorize-f-client-id/124602 "2025-01-23T06:58:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MSalman81](https://avatars.discourse-cdn.com/v4/letter/m/f1d935/32.png) [@MSalman81](https://community.hubspot.com/u/MSalman81)\
**Post date:** [January 23, 2025, 6:58am UTC](https://community.hubspot.com/t/got-error-auth-url-f-https-app-hubspot-com-oauth-authorize-f-client-id/124602/1 "2025-01-23T06:58:54Z")

</div>

i am using this code(

auth\_url = (

f"[https://app.hubspot.com/oauth/authorize](https://app.hubspot.com/oauth/authorize)"

f"?client\_id={CLIENT\_ID}"

f"&redirect\_uri={REDIRECT\_URI}"

f"&scope={scope.replace(’ ', ‘%20’)}" # Replace spaces with %20

f"&state={encoded\_state}"

f"&code\_challenge={code\_challenge}"

f"&code\_challenge\_method=S256"

)

)  
to get token but getting error:

 ![Screenshot 2025-01-23 at 12.11.11 PM.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/d/4/d4bf5528815d6b9ec7ebda7189c3f4f5066adebb.png)

this is my header content:

Request URL:

[https://app.hubspot.com/api/oauth/v2/application-authorizations?portalId=49048252&clienttimeout=14000&hs\_static\_app=oauth-ui&hs\_static\_app\_version=1.7432](https://app.hubspot.com/api/oauth/v2/application-authorizations?portalId=49048252&clienttimeout=14000&hs_static_app=oauth-ui&hs_static_app_version=1.7432)

Request Method:

POST

Status Code:

400 Bad Request  
and response:  
{  
“status”: “error”,  
“message”: “Authorization failed because one or more scopes are invalid: [calling-access]. Please contact the app developer.”,  
“correlationId”: “e2fd053e-869c-43a5-b034-2423f850cdbf”,  
“context”: {  
“SCOPE\_GROUPS”: [  
“[calling-access]”  
]  
},  
“category”: “VALIDATION\_ERROR”,  
“subCategory”: “AuthorizationErrorType.INVALID\_SCOPE\_GROUP”  
}

I am using developer test accont.

---

<div class="post-metadata">

**Author:** ![kennedyp](https://avatars.discourse-cdn.com/v4/letter/k/49beb7/32.png) [@kennedyp](https://community.hubspot.com/u/kennedyp)\
**Post date:** [January 23, 2025, 6:50pm UTC](https://community.hubspot.com/t/got-error-auth-url-f-https-app-hubspot-com-oauth-authorize-f-client-id/124602/2 "2025-01-23T18:50:42Z")

</div>

Hi @MSalman81! Welcome to the Community-- happy to have you here 😊

Per @WendyGoh’s comment in another thread "[_Initiate an Integration with Oauth 2.0_](https://developers.hubspot.com/docs/methods/oauth2/initiate-oauth-integration?_gl=1*1sdrqaf*_ga*ODk4Mzk2MDk4LjE3Mzc1OTA0Nzk.*_ga_LXTM6CQ0XK*MTczNzY1NzYwMy4xMy4xLjE3Mzc2NTc5NjguNDkuMC4w) _(Under the scopes table \> third row), there’s a note that state the following:_

_Note: Access to specific data will depend on the subscription that the HubSpot account has._"

Are you using a Sales or Service Hub Starter/Pro/or Enterprise account? This would be required for calling access.

I want to invite some subject matter experts to see if they have any suggestions.

Hey @GiantFocal, @evaldas, do you have any thoughts on what may be causing this error?

_Best,_

Kennedy
