Oauth-token does not have proper permissions (contact api)


#1

From hubspot response log shows:

{"status":"error","message":"This oauth-token (CM7vhJiDLRICAQEY8-fBAiDPiLEDKNisCzIZAKaKpWvVQwXiU-V8MMLdWvW-k5REYirQHjoPAAAAQQAAAAAAAAAAAAABQhkApoqla1JXFyNlV6Cm4G12XIQtMXYc7xgQ) does not have proper permissions! (requires all of [contacts-read])","correlationId":"508fe207-49fa-42af-bcfd-3aa33283fc82","requestId":"2be77c48db8263754df449b1e6289d3a"}

i used the token api to fetch the access token info, there is a contact scope, and totally the same as other successfuly access token:

{
    "token": "CM7vhJiDLRICAQEY8-fBAiDPiLEDKNisCzIZAKaKpWvVQwXiU-V8MMLdWvW-k5REYirQHjoPAAAAQQAAAAAAAAAAAAABQhkApoqla1JXFyNlV6Cm4G12XIQtMXYc7xgQ",
    "scopes": [
        "contacts",
        "oauth"
    ],
    "hub_id": 5272563,
    "app_id": 185944,
    "expires_in": 19328,
    "token_type": "access"
}

#2

Hi @eaglerayp, can you send me your HubID and the App ID that's requesting these permissions? When I've seen this issue in the past, it's because the account selected was a Developer Account without contacts rather than the test account or live production account.


#4

it's in the post. thanks.

    "hub_id": 5272563,
    "app_id": 185944,

#5

Hi @eaglerayp, so sorry I don't know how I missed that! Yes, so when I go to the HubID in question (5272563), this Account is a Developer Account. This inherently does not have access to Contacts. You'll need to generate an access and refresh token for either a Test Account or a live production account so that your Oauth token can make requests to the proper tool. You likely just selected the wrong account when redirected to the page where you authorize the account for your application.


#6

Okay, that's solved. This is because the authorized by the wrong account type. Thanks!