APIs & Integrations

hridayesh
Participant

Authorized Contact Creation

Hi there,

Thank you for taking a moment to read this post.

I am a first time user of HubSpot and I have been tasked with setting up contact API Integration (one registered contact per API call).

Essentially, I need to know how to configure my api url and authentication token. I have setup a developer hubspot account and contact API is working when I make a call as below screenshot:
Hubspot1.PNG


But I am asked to use Oauth authentication instead of API key authentication. So I changed the call as per below image:
Hubspot2.PNG

 

But as its highlighted, it says the call is unauthorized, and the detailed response is:
{"status":"error","message":"Any of the listed authentication credentials are missing","correlationId":"b6989a8b-61e5-4fd7-ac4f-d07647f88df3","engagement":{"hapikey":"hapikey not engaged. hapikey is not present in query params.","oauth-token":"oauth-token not engaged. Malformed OAuth access token found in request header.","vendorkey-gae":"vendorkey-gae not engaged. Vendorkey not found in request headers.","access_token":"access_token not engaged. Token not found in query params.","shhkey-v1":"shhkey-v1 not engaged. Shhkey not found in the request header.","app-cookie":"app-cookie not engaged. App cookie is not present on the request.","internal-cookie":"internal-cookie not engaged. Cookie not found in the request.","legacy-app-cookie":"legacy-app-cookie not engaged. Auth cookie is not present in the request."},"requestId":"a50776a99716e28fe90807b389ed390b"}

Any help the community can give me would be so very greatly appreciated!

0 Upvotes
3 Replies 3
cbarley
HubSpot Alumni
HubSpot Alumni

Authorized Contact Creation

Hi @hridayesh ! Your issue looks similar to those found here:

https://integrate.hubspot.com/t/problem-authenticating-timeline-event/6302/4

and here:

https://community.hubspot.com/t5/APIs-Integrations/Any-of-the-listed-authentication-credentials-are-...

 

This indicates you're either not using your API key from your production account to authenticate calls, or using our OAuth 2.0 flow. Since it looks like you're trying to use an app in a developer account and authenticate using an OAuth token, you should go through the OAuth flow  to retrieve your OAuth token that will allow you to make a request to HubSpot.

 

I'd recommend starting here: https://developers.hubspot.com/docs/methods/auth/oauth-overview

 

0 Upvotes
hridayesh
Participant

Authorized Contact Creation

Thanks @cbarley, but it did not work...
Could anyone please help me with this?

0 Upvotes
cbarley
HubSpot Alumni
HubSpot Alumni

Authorized Contact Creation

Hi @hridayesh are you using an API key or an OAuth token? You should find your API key in your integrations settings following this video: 

 

api key.gif

 

I can't tell you what's wrong with your code, but if you provide:

  1. The raw request URL you're using including the method.
  2. The raw request body you're sending to HubSpot
0 Upvotes