APIs & Integrations

Mkhurshid
Participant

AccessToken Information Endpoint not working

SOLVE

The following end point is not working for me

https://api.hubapi.com/oauth/v1/access-tokens/{ACCESS_TOKEN}}

Postman has the following reponse

 

{
"status": "error",
"message": "The access token must have the correct format",
"correlationId": "a0d2c7fb-9edf-4822-a924-8b931ffe9d90"
}

 

I know Access Token is good since I use the Access Token for standard API requests and I do not have an issue. 

 

This is how I am generating the Oauth2 Access Token

 

https://legacydocs.hubspot.com/docs/methods/oauth2/get-access-token-information

 

0 Upvotes
1 Accepted solution
Mkhurshid
Solution
Participant

AccessToken Information Endpoint not working

SOLVE

Nevermind works like a charm, I had an underscore in the URL instead of a dash 🙄. Thanks for your help.

View solution in original post

0 Upvotes
4 Replies 4
FG_
Participant

AccessToken Information Endpoint not working

SOLVE

We are using the NodeJS SDK and we're using the function `

hubspotClient.oauth.accessTokensApi.get`
This function throws an error when we pass the access token like this:
```
hubspotClient.oauth.accessTokensApi.get(user.hubspotAccessToken)
```
The variable `user.hubspotAccessToken` is 100% valid and we use the literally same variable for all other requests when instantiating the client.

I debugged your code and the `get` function from your client is trying to make a request to the following endpoint (which looks correct)
 

This is the path I can see from the debugger.

'/oauth/v1/access-tokens/pat-eu1-censored-rest-of-access-token'

 

Please can you tell me what I can do?!

0 Upvotes
Mkhurshid
Participant

AccessToken Information Endpoint not working

SOLVE

Yes I am still having an issue. Can you share the cURL. It simply 

0 Upvotes
Mkhurshid
Solution
Participant

AccessToken Information Endpoint not working

SOLVE

Nevermind works like a charm, I had an underscore in the URL instead of a dash 🙄. Thanks for your help.

0 Upvotes
dennisedson
HubSpot Product Team
HubSpot Product Team

AccessToken Information Endpoint not working

SOLVE

Hi @Mkhurshid 

Are you still having this issue?  I just did a test and did not encounter this error

@prosa , have you ever experienced this?


HubSpot’s AI-powered customer agent resolves up to 50% of customer queries instantly, with some customers reaching up to 90% resolution rates.
Learn More.

0 Upvotes