Scope/OAuth issues using the Events V3 API

Hi folks,

In an effort to see if the Events API may contain a way for me to get email events as well outside of the official email API, I wanted to see the data that comes from the Events V3 API.

I keep getting this error despite clearing my cache, verifying my test account permissions, modifying my code to include the business-intelligence scope and changing my application scope to require the business-intelligence scope for this API. Accounts Dashboard | HubSpot

{“message”:“Your app doesn’t the have scopes needed to make this call. Do you have access to the ‘business-intelligence’ scope? Missing auth details: event-detail-read,web-analytics-api-access”}

Anyways, thanks team for any support

Edit:

does this line here imply that I can’t access this API unless the free test and dev account I have (separate from my dev account) is upgraded to a higher enterprise plan?

Hey, @CBarnwell :waving_hand: Thanks for your question. Can you clarify which account cannot use the mentioned API? Is it one of the app test accounts created from a dev portal? Or is this happening with a free HubSpot account that you are testing with?

Thanks! — Jaycee

Hi @Jaycee_Lewis so, I have a oauth-based app install on my dev account that’s trying to access the business-intelligence data on the app test account.

Edit: Just to clarify, it’s an oauth-based app on my dev account that’s installed on the app test account. I am trying to access the business-intelligence data from the app test account.

Hey, @CBman :waving_hand: I get the same error using my test portal and a Private App.

Request:

curl --request GET \
 --url 'https://api.hubapi.com/events/v3/events/?objectType=cats' \
 --header 'authorization: Bearer YOUR_ACCESS_TOKEN'

Response

HTTP 403

{
 "status": "error",
 "message": "Insufficient scopes, requires one of: [event-detail-read,web-analytics-api-access]",
 "correlationId": "deffb184-1a36-444c-9bf7-6d98214c8f07",
 "errors": [
 {
 "message": "Your app doesn't the have scopes needed to make this call. Do you have access to the 'business-intelligence' scope? Missing auth details: event-detail-read,web-analytics-api-access"
 }
 ],
 "category": "INVALID_AUTHENTICATION"
}

Scopes on my Private App

I am going to track down the team that owns this endpoint and confirm the following:

In fully transparency, I will be OOO Friday, but I’ll get this to my internal resources tomorrow.

Thank you very much for taking the time to post this issue here.

Talk soon! — Jaycee

Thanks @Jaycee_Lewis for looking into this and forwarding the information. You may need the business-intelligence scope mentioned in the request. I have that on my application although it doesn’t work.
I notice a new piece of information here though. I didn’t initially request for the behavioral_events.event_definitions.read_write but my account can’t access for that I think since when I request for that, I get this error.

 HTTP 403
 {
 "status": "error",
 "message": "Authorization failed because this account doesn't have access to the scopes required by the app. Please contact HubSpot support.",
 "correlationId": "c7676c79-0aa4-4180-b413-af1ba26af698",
 "category": "MISSING_SCOPES",
 "subCategory": "AuthorizationErrorType.PORTAL_UNAUTHORIZED"
 }

I also noticed that in the docs, https://developers.hubspot.com/docs/api/scopes that only marketing enterprise accounts can leverage that scope. Is that scope necessary to access the v3 Events API?

@Jaycee_Lewis Is there any update on this issue?

Hello, I have the same issue. My app has business-intelligence access, although not behavioural_events as my account cannot access that even though it is super admin.

I updated my free trial subscription on the dev account and it started to work FYI for anyone else troubleshooting this issue.
However, it doesn’t seem like I can retrieve any email send events with this API even though I’m sending emails and getting statistics on them via the marketing emails APIs. Should the /events v3 API retrieve email events as well? I used the query events API to retrieve all the ones that have “sent” in the name.
@Jaycee_Lewis