Hello, I’m attempting to verify that my company’s HubSpot OAuth2 app can be integrated with our clients’ HubSpot accounts. I understand that CRM-only HubSpot accounts do not have access to scopes that are only available to Marketing HubSpot accounts.
I have no problem authorizing with the Test Portal that’s set up alongside our Dev Account. However, I’m not able to authorize our app when using a dummy HubSpot account (Hub Portal ID: 3306102) with these products: HubSpot Marketing Free, HubSpot CRM, and HubSpot Sales Free. Specifically, I get this error:
You do not have the correct role to grant these permissions. Please contact your administrator.
The HubSpot OAuth API documentation denotes the
optional_scope parameter which has this description:
Optional scopes will be automatically dropped from the authorization request if the user selects a HubSpot account that does not have access to that tool (such as requesting the social scope on a CRM only portal).
Our app does request permission for Marketing-only scopes, namely “content”, “reports”, “automation”, and “forms”. I added those scopes to the
optional_scope param as per the documentation.
The resultant OAuth URL looks like this:
Attempting to initiate OAuth access using this URL with the
optional_scope param also results in the permissions error I noted above.
I attempted to make all the scopes optional:
But again, this results in the same error.
I’ve found similar issues, one of which has a note saying it was resolved:
Am I misunderstanding the purpose of optional scopes? Any insight into this error would be appreciated. Thanks in advance!