Got error auth_url = ( f"https://app.hubspot.com/oauth/authorize" f"?client_id={

i am using this code(

auth_url = (

f"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:

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

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.

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

Per @WendyGoh’s comment in another thread "Initiate an Integration with Oauth 2.0 (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