Permissions error trying to install our own APP


#1

Hello,

We have created our own app. In first step creating app, we have choose “private app” ( One off Only my portal will get value out of this amazing app).

The owner of the app (developer account) is developer@domain.com
The owner of the account is account@domain.com

the owner of the app (developer@domain.com) has account administrator and sales administrator permissions in the account.

When the owner of the app or owner of the account tries to install app (https://app.hubspot.com/oauth/authorize?client_id=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&scopes=contacts&redirect_uri=http://www.domain.com/hubspot/auth), we get a Uh oh! You do not have the correct role to grant these permissions. Please contact your administrator.

Our App ID is: 36676
Our Portal ID is: 596253

Thanks for your help!


Hubspot OAuth2 Scopes Failure
Problem starting to use oauth 2
OAuth2: Cannot grant access to sales portal even though I'm admin
#3

@plytix this looks like it’s related to an issue that we’re already working on. I’ll post an update here as soon as this is fixed.


#4

Thank you @dadams. Wi’ll wait your response!


#5

Hi @dadams, I have seen on our log we are receiving webhooks from portalId 250707. Are you testing it?


#6

@plytix you’re seeing webhooks for that portal that were set up for your app with ID 36676? I haven’t tested that personally but I’ll check with the engineers who are working on this fix.


#7

@dadams yes, we are receiving webhooks from portalId 250707 in our app id 36676. I configured the app as “private app” (One off Only my portal will get value out of this amazing app) so I do not understand how another portalId can install and use this app…


#8

Just wanted to see if there was an update on this issue. I am seeing the same error.
I think I have my scopes setup properly.


#9

We are also seeing similar error while trying to connect to CRM portal:

  1. selecting CRM Portal: http://import2.d.pr/1jBa8/5TFyQkrp
  2. getting error like this: http://import2.d.pr/126fv/1Wy67cex

Is this the same issue?

Thanks,
Anton


#10

I am experiencing hte same issue:

A response of: { error_description: ‘missing or invalid scopes’,
state: 'XXXXXXXXXX,
error: ‘invalid_request’ }

In response to a request something like:

https://app.hubspot.com/oauth/authorize/?
scope=contacts%20automation
&client_id=XXXXX
&redirect_uri=myUrl.com
&response_type=code
&access_type=offline
&state=XXXXXXXXX

I suspect it has something to do with having created a trial account alongside my dev account. Using the dev account caused me to get the warning like the screenshot from OP.

Let me know if you want more repro steps or anything.

It sounds like my trial account is not allowed to use the API, and this bug is stopping my dev account from authorizing. So i did not need to create trial account. Is this all right?


#11

@dadams:
I am wondering what is going on with this. I have found this discussed in at least two other tickets, both of which seemed to end with private messages between you and the user.

I do not believe it has to do with my app permissions:

I am trying to rapidly upgrade/replace our old integration running on oauth1. For now I am using the hapi-key but I will need this sorted out by mid next week if possible. Do you know if this has been an issue caused by the user/request format or by something in your system as you suspected in a couple places?

Let me know if i can help with any more details or by attempting different url formats.

Thanks!
–Ralph


#12

I’m also getting this error. I have two accounts. One is developer account other is plain.
I can grant permissions for developer account but not for plain. Why it is?


#13

@plytix Sorry for the delay on this, the issue you were seeing with OAuth 2 and CRM-only portals should be fixed, so you should be able to grant the contacts scope to your portal.


#14

@111 What scopes are you using for this? Can you message me with the two Hub IDs you’re testing?


#15

Thank you. I think issue was fixed when we bought “marketing” tool.


#16

@dadams

Hi,

I have created a new app (id 37389) and I am trying to install it in my test portal (id 2645075).

I am accessing https://app.hubspot.com/oauth/2645075/authorize?client_id=xxx&scope=contacts&redirect_uri=http%3A%2F%2Fwww.hubspot.com
and everything is fine. I see the list of permissions.

However, when I click on grant access I am taken to this page:

Please advise.

Kind regards,
Ovi


#17

@geniiweb the scopes you request in the authorization URL should exactly match the scopes you have selected for the app in the app settings, so if you’re only including the contacts scope in the URL, you’d also only want the contacts scope checked for the app.


#18

@dadams Thank you very much for the quick reply. I was able to install the app. I matched the scopes exactly from the URL with the ones from the app settings. However, I have another problem. After installing the APP, I added a contact through the API (using the API key), but I do not see it in my test portal where the app is installed. I know for sure that the contact has been added because I can retrieve it through API calls. How can I see in my test portal the data that I am adding through the API?

Also worth mentioning is that I tested also through the Hubspot Demo Portal and there I was able to see the contacts that I added through the API.


#19

API keys are portal specific, so you’ll need to make sure that you’re looking in the same portal that you’re using the API key for. If you’re working with test portals inside your developer account, each individual test portal has it’s own API key, so you’d need to generate and use the key for the specific portal that you’re logged into and looking at the Contacts Dashboard.


#20

Thank you. I generated a new API key from my test portal and everything worked fine.


#21

I am using oauth, and I am getting a 20X response code. 204 i believe.