# Insufficient Scopes

**URL:** <https://community.hubspot.com/t/insufficient-scopes/13286>\
**Category:** APIs & Integrations\
**Tags:** developer-tools, events\
**Created:** [February 28, 2019, 7:08pm UTC](https://community.hubspot.com/t/insufficient-scopes/13286 "2019-02-28T19:08:00Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wes4](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/wes4/32/48852_2.png) [@Wes4](https://community.hubspot.com/u/Wes4)\
**Post date:** [February 28, 2019, 7:08pm UTC](https://community.hubspot.com/t/insufficient-scopes/13286/1 "2019-02-28T19:08:00Z")

</div>

Hello, we make a call to the the [Get analytics data for specific objects](https://developers.hubspot.com/docs/methods/analytics/get-analytics-data-by-object) using the

**event-completions**

object and

**total**

for the **time\_period** , we get a forbidden error saying “Insufficient scopes: requires event-analytics-api-access”. I do not see that scope in the list of scopes in the [Oauth 2.0](https://developers.hubspot.com/docs/methods/oauth2/initiate-oauth-integration#scopes) docs. Why did this suddenly start failing?

---

<div class="post-metadata">

**Author:** ![cbarley](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/cbarley/32/82559_2.png) [@cbarley](https://community.hubspot.com/u/cbarley)\
**Post date:** [March 1, 2019, 5:00pm UTC](https://community.hubspot.com/t/insufficient-scopes/13286/2 "2019-03-01T17:00:13Z")

</div>

Hi @Wes4 , Can you provide your App ID and the HubID of the account you’re making requests to? Happy to take a closer look here - I don’t think there were any scope changes on our end recently. Per the docs, you should be requesting the business-intelligence scope:

> **[Screenshot](https://prnt.sc/mrxkid)**
>
> Captured with Lightshot

---

<div class="post-metadata">

**Author:** ![Wes4](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/wes4/32/48852_2.png) [@Wes4](https://community.hubspot.com/u/Wes4)\
**Post date:** [March 1, 2019, 6:10pm UTC](https://community.hubspot.com/t/insufficient-scopes/13286/3 "2019-03-01T18:10:12Z")

</div>

Sure, our AppID is 63251, and the HubID I am currently using is 127518. I have tried it with multiple HubIDs and they all fail.

The request looks like this:

`https://api.hubapi.com/analytics/v2/reports/event-completions/total?start=20181231&end=20190301&limit=300&offset=0`

The access token definitely includes the business-intelligence scope.

---

<div class="post-metadata">

**Author:** ![cbarley](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/cbarley/32/82559_2.png) [@cbarley](https://community.hubspot.com/u/cbarley)\
**Post date:** [March 1, 2019, 6:37pm UTC](https://community.hubspot.com/t/insufficient-scopes/13286/4 "2019-03-01T18:37:05Z")

</div>

Hi @Wes4 , when checking that HubID (127518), I’m not seeing your APP “Deftly Test” (which is what app ID 63251 is called - [Developers | HubSpot](https://app.hubspot.com/developer/4437515/application/63251)) installed in your [Integrations page](https://app.hubspot.com/integrations-settings/127518/installed), I just see the “Deftly” app. Did you mean to send over a different App ID?

If I go to the actual Deftly App, then go to the Monitoring section here: [Developers | HubSpot](https://app.hubspot.com/developer/5155798/application/184165/monitoring/api), I can grab an access token from the failed requests to the Analytics API:

> **[Screenshot](https://prnt.sc/mryrrp)**
>
> Captured with Lightshot

I can then use the access token in this endpoint: [Accounts Dashboard | HubSpot](https://developers.hubspot.com/docs/methods/oauth2/get-access-token-information). I can see that you do indeed have the business-intelligence scope here:

> **[Screenshot](https://prnt.sc/mrysy0)**
>
> Captured with Lightshot

That said, the source Account for that error (127518) is not an Enterprise Account. To access Events, you must be a Marketing, Sales or Service Enterprise customer as per the “Applies To” section at the top of this doc : [https://knowledge.hubspot.com/articles/kcs\_article/events/create-clicked-element-events](https://knowledge.hubspot.com/articles/kcs_article/events/create-clicked-element-events). Since this account has a Marketing Professional subscription, this request failing is expected behavior

---

<div class="post-metadata">

**Author:** ![Wes4](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/wes4/32/48852_2.png) [@Wes4](https://community.hubspot.com/u/Wes4)\
**Post date:** [March 1, 2019, 7:17pm UTC](https://community.hubspot.com/t/insufficient-scopes/13286/5 "2019-03-01T19:17:56Z")

</div>

Ohhh okay that makes sense. Sorry, this was for a client and I was misinformed on what type of subscription they had.

---

<div class="post-metadata">

**Author:** ![cbarley](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/cbarley/32/82559_2.png) [@cbarley](https://community.hubspot.com/u/cbarley)\
**Post date:** [March 1, 2019, 7:46pm UTC](https://community.hubspot.com/t/insufficient-scopes/13286/6 "2019-03-01T19:46:55Z")

</div>

No prob @Wes4  
 ![16x16_smiley-happy.png.png](https://d2qpr2jzcazej7.cloudfront.net/original/2X/2/22d5e40d253def47f5f4ea7f0e3e70be19010689.png)
