OAuth Connection Error


Hi All,

I am getting this error when connecting. I set up an app in HS, enabled read/write for all objects, ran an auth in google sheets using the ID/secret IT and ran the link the auth gave me. Support didn't know what to do. Any idea guys? Thanks a lot!!


Request for Integration Permissions

Uh oh!

Insufficient scopes were provided. Please contact the integrator.


Request for Integration Permissions

Uh oh!

Insufficient scopes were provided. Please contact the integrator.

This was the link used

[18-09-28 09:51:21:692 CEST] Open the following URL and re-run the script: https://app.hubspot.com/oauth/authorize?client_id=5304c6fc-faac-4b0b-8a0d-26facea31152&response_type=code&redirect_uri=https%3A%2F%2Fscript.google.com%2Fmacros%2Fd%2F1bTdM5bubrrfPVeXpz4Kuybzj2c5-LmcHBjUyZcfQ3TBSqNTQjWw-iczY%2Fusercallback&state=ADEpC8wxNGMctMCls--OECVuCOQcwXqnw6GZo2d2z7I3uDD-Jy4qjkYtlhvZOID1uzMsE8gpWseMVYaAfG7pqaKrNGRJDtLRWHs4rRpV1WcoL7nLTUBjiA19L_V3z3NpgznA8tzJwyJCDKLnjWaXx2Ie0pimg8fTdymCycMdeP4VOq483Nj9cHmni1fP9HFxRrmLQDguJwvD6iA9hu1Uy0Koi7wuG9MZa0Zrms0YuakPmhQaGKtpCYJAYP2KXZ9dlK_ACw6zT_IDmiPIgZZ6Uup1T5QK5aQOY7QWx6W3UpRPzVe1-CTyjAs4dtz2ciIojYXz-gcUXHYbKj21SpKx78LLlMtd_dzLHg&scope=contacts



Hi @Roman_Petr, can you provide me with your App ID and your hubspot developer portal ID so I can take a look in your developer portal? After you get the Client Secret ID when you're redirected to your Redirect URI, you'll need to grab the client secret value from the URL and make a GET request to this endpoint to generate your Access Token.

Once you have the access token, you can then start making requests with that app.


Hi Connor,

Thanks for your response. App ID 181453 and Dev ID hubspot-developers-tq8rk5.com 4961928

My understanding is that after the URL is used, I should just select a HubSpot account and that's it. Following the below:

But it does not let me past the account selection in HS


Got it @Roman_Petr, thanks for that info and the article -- very helpful! I was able to follow this article and get the code to work within my own portal. If you're getting hung up on the authentication part, do you have a HubSpot free or paid CRM account to work with? You won't be able to authenticate an application through your developer portal - you'll need an account or test account to do so. Do you have a CRM account? If not, you can try testing your app here: https://developers.hubspot.com/docs/faq/testing-hubspot-apis or creating a test account via these instructions: https://developers.hubspot.com/docs/faq/how-do-i-create-a-test-portal. Let me know if this helps!


Ah, Apologies there @Roman_Petr, I missed where you said you'd already contacted Support. If this is the case, can you share your sheets with me so I can dig into the code a bit more thoroughly?


Hey Roman, Sorry for the string of replies here, but I think I found the source of the issue. When I tested your client secret and client id and tried to run the authenticate function, I was seeing the same permissions errors as you. However, in your application I ended up (counterintuitively) removing all scopes set on the application here: https://app.hubspot.com/developer/4961928/application/181453 in your settings. This removed the error and was able to get to the next screen to select my portal and accept to authenticate the app.

I'm going to dig into this scopes issue and see why the authentication might fail when selecting those, but if you have none selected in your Developer Account, this appears to fix the issue.


Hi Connor,

Thanks but it is still not working. Getting the same issue after running auth



Hi @Roman_Petr, I was able to authenticate my own portal using your client ID and client secret and make requests that you can see here: https://app.hubspot.com/developer/4961928/application/181453/monitoring/api so it doesn't appear to be an issue with the API or the article. Which email address are you signed into when the first popup appears like this one?:


For me, I signed into my main gmail account after clicking Review permissions. Make sure the user you're signing in with is the same user email address you use for HubSpot.

Next, when the authentication screen pops up, which portal are you selecting? I selected my own Enterprise portal. Make sure you aren't selecting your Developer Portal, but rather a live portal that has access to Contacts.


Hi Connor,

Would it be possible to jump on a quick call?

I am trying this with roman.petr@moonfare.com both on GDocs and on Hubspot and have Sales Prof and Admin rights in HS. Still doesn't work..



Hi @Roman_Petr, unfortunately I can't hop on a call. Our team that monitors the forums doesn't have the bandwidth to support calling out. I understand the forums aren't inherently a very quick way to get an answer, but this thread will be our best bet.

Can you make yourself a Super Admin in the portal that you're trying to link? Looking at this another time, and the fact I was able to run the script 3 separate times points to insufficient permissions if you're "just" an Admin. My fault on not suggesting that sooner, but as I've never seen this integration and Google Sheets is something external to HubSpot, I needed to be sure it wasn't something technical. I do have a feeling that being a super admin will fix this.


It works when Super Admin. Thanks!!


No worries! Sorry that took a while but glad you're good to go :slight_smile:


Hi Connor, sorry another question that's probably a bit silly. Is there any special connotation for pipelineids? Putting the displayed name there does not seem to work.


Getting the default pipeline data is fine


but just typing moonfare in the url gets me a 404




@Roman_Petr make sure you use the internal name of the pipeline (the internal value of it) in your Deal Property Settings here: https://app.hubspot.com/property-settings/HUB_ID_HERE/deal/pipeline