APIs & Integrations

Qele
Member

Marketing Email API

SOLVE

Dear Hubspot Team,

I'm trying to use the "Marketing Email API" to get all marketing email statistics. I am using the below API call:

https://api.hubapi.com/marketing-emails/v1/emails/with-statistics?hapikey=demo&limit=2

I am substituting "demo" with my own "key" and when I'm submitting the API I'm getting an error saying that  "Access to the resource is forbidden."

Any other APIs I'm using like deals or contacts are working just fine.

Any help will be much appreciated!

Thank you!

P.S I'm using PowerBI

0 Upvotes
1 Accepted solution
Qele
Solution
Member

Marketing Email API

SOLVE

As discussed with @WendyGoh ,

 

The content scope for Marketing Email API would require a paid marketing account (marketing professional/enterprise). 

View solution in original post

5 Replies 5
Qele
Member

Marketing Email API

SOLVE

No worries guys,

I think I know what the issue is. It is because I'm on the free version I guess.

If someone can confirm this as well will be great!

Thank you!

0 Upvotes
WendyGoh
HubSpot Employee
HubSpot Employee

Marketing Email API

SOLVE

Hi @Qele,

 

I hope all is well with you 😄

 

Look into both your portal - 6367222 and 4774178, while I'm able to see that both portal are on HubSpot free, they both have the free marketing email add ons (temporary). This means that using that portal you can send out marketing email temporarily. In this case, I would expect the endpoint to work. 

 

On my end, when using this endpoint: Get all marketing emails statistics to get the marketing statistics for both your portal - 6367222 and 4774178, I'm able to see the return results just fine. 

 

As I wasn't able to reproduce this and to ensure that our testing is consistent, would you mind trying it out again on an API client such as Postman? 

0 Upvotes
Qele
Member

Marketing Email API

SOLVE

Hi @WendyGoh ,

 

Thank you for your response. I trust you are doing well 🙂

 

I've tried pasting the API call into my browser (it should work that way) and I'm getting the below result:

 

{"correlationId":"7d69becb-353c-4d4a-865a-5af9880527ac","message":"This hapikey (mykey) does not have proper permissions! (requires any of [content-core-api-access])","requestId":"4ac348ce-e06b-4af9-a990-83ec1367d468","status":"error"}

 

 I don't think that this has something to do with PowerBI.

 

Any suggestions?

 

Thank you!

0 Upvotes
WendyGoh
HubSpot Employee
HubSpot Employee

Marketing Email API

SOLVE

Hi @Qele,

 

That's odd. I'm not seeing that error message.

 

In this case, can you direct message me the hapikey you're using? 

0 Upvotes
Qele
Solution
Member

Marketing Email API

SOLVE

As discussed with @WendyGoh ,

 

The content scope for Marketing Email API would require a paid marketing account (marketing professional/enterprise).