Insufficient scopes were provided

I’m getting this error when I try to install my application:

What’s weird because the only scope I’m requesting are: “crm.objects.contacts.read,crm.schemas.contacts.read”

And on apps’s scopes list they are there:

I don’t know if I’m doing something wrong.

But basically I did:

  1. Created app
  2. Added the scopes
  3. Clone the GitHub - HubSpot/oauth-quickstart-nodejs: A Node JS app to get up and running with the HubSpot API using OAuth 2.0 · GitHub
  4. Add CLIENT_ID and CLIENT_SECRET
  5. yarn install and yarn start
  6. Tried to install the app on an account test.

Someone can assist me?

@LGarcia9 , did you add the scopes in the install URL? If your app has all of these scopes selected, you will also need to add all of them to the install URL

Hi @dennisedson , yes, they are on url, this is the URL generated by the app:

https://app.hubspot.com/oauth/authorize?client_id=c2f6d221-7d34-4a84-8043-7ab37fe0e023&scope=crm.objects.contacts.read%20crm.schemas.contacts.read&redirect_uri=https%3A%2F%2Flocalhost%2Foauth-callback

I found the issue, I added more scopes on admin than I was adding on url, The scopes that are listed in your app need to match the scopes you list in your authorization call.

That is the reason for the issue, after I removed the unnecessary scopes from App, and add all of them on url, it worked.

Thanks