I just made a new private app, replaced my old API key with the new Access Token and It’s just not working and Is not connecting my site with hubspot. Is the API URL still https://api.hubapi.com ? Or did i need to do anything more then just make a private app?
Hey, @AAwachi
One question — how are you including your Private App key for authorization? Private App keys are not included in the request URL. You’ll need to include it in the request header. Here is more information:
- Authentication Overview
- Using OAuth 2.0 access tokens (applies to Private Apps)
If you are including your Private App as a bearer token in the Authorization http header, can you share an example request and response, please? Along with the specific endpoint you are using.
Thank you! — Jaycee
Same issue for me also. i am calling from Asp.net core Skarp.HubSpotClient library like this
…
_hubspotContactClient = new HubSpotContactClient(“token”);
_hubspotContactClient.GetByIdAsync<MyModelClass>(12345);
…
It took me a while to understand, but the Access Token does not behave like an API Key. It behaves like an OAuth token. For example, if you try out one of the examples in the API documentation, you need to check OAuth instead of API (actually I just checked, and they’ve added a third option: Private App Access token ;-))
If you’re like me and very unclear on authentication protocols, I’d suggest looking at the API Doc and/or trying to set up tests via Postman. It’s great to understand what’s going on.
