APIs & Integrations

kawsar-hamid
Member

Create a marketing event

SOLVE

Hello,

I have been trying to create a marketing event by following this API - https://developers.hubspot.com/docs/api/marketing/marketing-events

 

The response I get is "{"status":"error","message":"Unable to deduce app-id from this request.","correlationId":"fdd2afbf-7d97-4462-bff6-4933f2860a8f"}"

 

Here is the request payload-

 

 

POST /marketing/v3/marketing-events-beta/events?hapikey={apikey} HTTP/1.1
Host: api.hubapi.com
Content-Type: application/json
Cache-Control: no-cache
Postman-Token: 969a8735-286d-610d-73a9-0b59099ea6e2

{
"eventName":"Hubspot Marketing Event Dummy",
"eventType":"WEBINAR",
"startDateTime":"2020-11-01T05:00:00.000Z",
"endDateTime":"2020-11-01T06:30:00.000Z",
"eventOrganizer":"Manobyte",
"eventDescription":"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
"eventUrl":"https//example.com/marketingevent/%s",
"eventCancelled":false,
"externalAccountId":"1e5e35ed-23d8-4a9e-9477-3395b3fb14fa",
"externalEventId":"17"
}

 

Please help me to find what is wrong?

1 Accepted solution
danielfrancis
Solution
Member | Elite Partner
Member | Elite Partner

Create a marketing event

SOLVE

Hey all!

I am unsure how to make a POST req successfully but I have found a solution to the "app-id" issue.

 

Instead of using the hapikey to authorize the request, you want to add <Authorization> to your headers as a key. For the value of Authorization, you want to use your applications access token. If you do not have a HubSpot app or are unsure about how to create a HubSpot app, click this link.

 

After you have your app set up, you can manage access tokens. 

 

The reason for using the apps access token seems to be the response when trying to use the hapikey. Instead of defining the <app-id> somewhere within the query params (as the documentation explains), when you use the access token HubSpot grabs the app-id automatically. Effectively removing the need for an app-id param.

 

Hope this helps!

View solution in original post

13 Replies 13
Jasper_Madrone
Participant

Create a marketing event

SOLVE

I created an app to help with this if you are interested. It is approved on the HubSpot marketplace, and I think it could help your use case. It allows you have a settings page UI to create events directly in the HubSpot tool without needing to go to the API. I also added a Workflow action that can manage the registration status of contacts for the created events.

Check it out here

0 Upvotes
danielfrancis
Solution
Member | Elite Partner
Member | Elite Partner

Create a marketing event

SOLVE

Hey all!

I am unsure how to make a POST req successfully but I have found a solution to the "app-id" issue.

 

Instead of using the hapikey to authorize the request, you want to add <Authorization> to your headers as a key. For the value of Authorization, you want to use your applications access token. If you do not have a HubSpot app or are unsure about how to create a HubSpot app, click this link.

 

After you have your app set up, you can manage access tokens. 

 

The reason for using the apps access token seems to be the response when trying to use the hapikey. Instead of defining the <app-id> somewhere within the query params (as the documentation explains), when you use the access token HubSpot grabs the app-id automatically. Effectively removing the need for an app-id param.

 

Hope this helps!

PSayers
Member

Create a marketing event

SOLVE

This is still broken when using HAPI key. It's been over a year.

Are there any updates here?

0 Upvotes
LHarney
Contributor | Elite Partner
Contributor | Elite Partner

Create a marketing event

SOLVE

Can anyone tell me where you can find 'externalAccountId'and 'externalEventId'? Thanks

0 Upvotes
LHarney
Contributor | Elite Partner
Contributor | Elite Partner

Create a marketing event

SOLVE

This occurs when you use the hapi_key. This error does not occur when using OAuth authentication.

0 Upvotes
Deeptortion
Participant

Create a marketing event

SOLVE

Can someone please update on this? The issue still persists.

The support team, on reaching out, has the same canned response - and keeps pointing to an unresponsive developer forum on slack. I mean, even on Slack, there's no dedicated support - and mostly just users helping other users out.

0 Upvotes
BCoates
Participant

Create a marketing event

SOLVE

Did you find a solution to this having same problem

0 Upvotes
Caterpy
Member

Create a marketing event

SOLVE

I'm also getting this error, is there a solution ? 
@kawsar-hamid  and @ASavaliya  have you managet to find a solution for this ?

0 Upvotes
ASavaliya
Participant

Create a marketing event

SOLVE

Facing same issue.

Is there any solution or work around for this?

0 Upvotes
dennisedson
HubSpot Product Team
HubSpot Product Team

Create a marketing event

SOLVE

Hey @kawsar-hamid , are you using your Developer hapikey

0 Upvotes
kawsar-hamid
Member

Create a marketing event

SOLVE

Hello Dennis,

 

Yes, I am using my developer hpikey. 

dennisedson
HubSpot Product Team
HubSpot Product Team

Create a marketing event

SOLVE

Hi @kawsar-hamid ,

Are you still having issues with this?  First of all, the JSON you here has an extra ] at the end.

Wondering if @ParkerShort has had a chance to play with this new API, yet and has a suggestion!

0 Upvotes
kawsar-hamid
Member

Create a marketing event

SOLVE

@dennisedson Yes, still same issue

0 Upvotes