OAuth Connection Error


#1

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!!

Roman

Request for Integration Permissions

Uh oh!

Insufficient scopes were provided. Please contact the integrator.


#2

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


#3

#4

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.


#6

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


#7

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!


#8

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?


#9

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.


#10

Hi Connor,

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

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=ADEpC8xmIWi4AR7TrOseLhVqGq-Q-aKhtWQjP5bWZHO-VJSJmUbnvo9R9-3nZzsbcG8OKSV5-8rJTuS6Vi5_1Du0uMvl94DLYZRp3F_KBgQjgaa948832o37R4-QEBFfvIlz67dVNkfWnB1NZYh_PzQNHvvnAFqw2tdscwant2B4xJRaDSTV4kmOFl2GkFwhvDZAOxuViT3Lt4xWZhLoXN1m7k9XO9xnhlwkfy4KrtnqVLF3SBdsIRb-sw3Hd1bhIqQprR0P4pCO0ZQ1AV_ouCEbQ4wQ_iu-Uv7LAlF8Lw6wSwVmsH3x6Dc&scope=contacts


#11

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?:

15

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.


#12

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..

Thanks!


#13

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.


#14

It works when Super Admin. Thanks!!


#15

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


#16

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.

image

Getting the default pipeline data is fine

image

but just typing moonfare in the url gets me a 404

image

Thanks!


#17

@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

)