APIs & Integrations

remer
Miembro

This oauth-token (xxx) does not have proper permissions! (requires all of [cms-analytics-api-acc

Hi,

 

Today I started seeing this error in my application (it was working before)

 

```

This oauth-token (xxxxxxx) does not have proper permissions! (requires all of [cms-analytics-api-access])

```

I'm try to fetch this `https://api.hubapi.com/analytics/v2/reports/landing-pages/{pageId}/sources/summarize/daily?start=201...`

 

I could not find documentation about `cms-analytics-api-access` in the Scope list here https://developers.hubspot.com/docs/methods/oauth2/oauth2-overview. If I include it in the authentication request, Hubspot authorization page shows an error saying "Couldn’t complete the connection An invalid scope name was provided. Please contact the integrator."

 

 

0 Me gusta
7 Respuestas 7
WendyGoh
HubSpot Employee
HubSpot Employee

This oauth-token (xxx) does not have proper permissions! (requires all of [cms-analytics-api-acc

Hi @remer,

 

I hope all is well with you 😃

 

When looking at the endpoint you're using - HubSpot Analytics API and cross checking it under the scope here: Initiate an Integration with Oauth 2.0 (Under the scopes table > third row), there's a note that state the following:

Note: Access to specific data will depend on the subscription that the HubSpot account has. See the Analytics API overview for more details.

 

This means that certain analytics data requires Marketing professional and above or Marketing Enterprise or it is open to free user. You can check this over here: Analytics API Overview and based on the analytics data that you shared across, the required plan is:

  • Marketing Hub Professional or Enterprise, or HubSpot CMS

I hope this helps to clarify!

0 Me gusta
xy-siang
Miembro

This oauth-token (xxx) does not have proper permissions! (requires all of [cms-analytics-api-acc

Hi Wendy, 

 

I am also facing such similar issue but with a slight different error msg: 'authorized token does not have proper permissions! (requires all of [cms-analytics-api-access]). '

 

I looked the guide which you shared with  remer, Analytics API overview but don't quite understand.

 

I am still new in API coding and could you please share advice on how to solve it with API coding if needed.

 

Thank you. 

Regards

0 Me gusta
WendyGoh
HubSpot Employee
HubSpot Employee

This oauth-token (xxx) does not have proper permissions! (requires all of [cms-analytics-api-acc

Hey @xy-siang,

 

Just to clarify, what's the request url that you're using? 

 

Additionally, what's the portal ID in question?

0 Me gusta
xy-siang
Miembro

This oauth-token (xxx) does not have proper permissions! (requires all of [cms-analytics-api-acc

Hi @WendyGoh , 

 

I am trying to pull data from this site: https://app.hubspot.com/reports-dashboard/3978304/view/998120

 

As for portal ID, do you mean the login ID to access the hubspot account? If so, it's vinod@aven-sys.com

 

Thank you

 

Regards, 

XY Siang

0 Me gusta
WendyGoh
HubSpot Employee
HubSpot Employee

This oauth-token (xxx) does not have proper permissions! (requires all of [cms-analytics-api-acc

Hey @xy-siang,

 

By portal ID, I mean the hub ID which is this - 3978304. 

 

In this case, I took a look at your portal 3978304's subscription and note that it's on marketing starter. However, for certain endpoint on the Analytics API, it requires - Marketing Hub Professional or Enterprise i.e. Get all analytics views

 

As such, if you're using any of the endpoint that requires Marketing Hub Professional or Enterprise plan, you'll likely run into the permissions error. 

0 Me gusta
xy-siang
Miembro

This oauth-token (xxx) does not have proper permissions! (requires all of [cms-analytics-api-acc

Hi @WendyGoh

 

Thanks for your explanation!

 

Understood that portal 3978304's subscription is on a marketing starter and if using endpoint on the analytics API that requires Marketing Hub Professional or Enterprise, most likely will run into permission error. 

 

So my next question is how can my client who is managing this hubspot account change the endpoint of analytics API to 'marketing starter' to avoid such permission error? Could you please advise on this? Thanks!

 

Regards, 

 

XY Siang

 

 

0 Me gusta
WendyGoh
HubSpot Employee
HubSpot Employee

This oauth-token (xxx) does not have proper permissions! (requires all of [cms-analytics-api-acc

Hey @xy-siang,

 

It is not possible to change the endpoint i.e. Get all analytics views to allow it for marketing starter subscriptions. 

 

Here's the overview of each Analytics endpoint - Analytics API Overview and their respective required plan. I'd advise your client to use only API that requires minimally a marketing starter plan if the app requirement is: minimally a marketing starter portal. 

0 Me gusta