Refresh OAuth 2.0 Access Token returns "status" JSON key rather than "error" despite documentation

New Contributor

A POST request to:

https://api.hubapi.com/oauth/v1/token

with request parameters as such:

data = { 
"grant_type": "refresh_token", "client_id": client_id, "client_secret": client_secret, "refresh_token": refresh_token }

returns:

{
"status": "BAD_REFRESH_TOKEN",
"message": "missing or invalid refresh token",
"correlationId": "x-x-x-x-x",
"requestId": "x"}

rather than:

{
  "error": "error_code",
  "error_description": "A human readable error message"
}

which is specified at:

https://developers.hubspot.com/docs/methods/oauth2/refresh-access-token

 

Thoughts?

Reply
0 Upvotes
4 Replies 4
HubSpot Moderator

Hi @CoderAcademy , good catch! I'll clarify with the team if there was a change and then get it sorted for you. 

New Contributor

Hey Connor,

 

Thanks for following up on this, has there been any development with this query?

 

Cheers,

 

James.

Reply
0 Upvotes
Highlighted
HubSpot Moderator

Hey @CoderAcademy , sorry about that - I forgot to follow up here. Looks like there hasn't been a change on our end, but the docs need to be updated. Thanks for catching that. I'll reach out to the relevant team to get that sorted!

Reply
0 Upvotes
New Contributor

You're a champion,

 

Thanks.

Reply
0 Upvotes