APIs & Integrations

CoderAcademy
Participante

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

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?

0 Avaliação positiva
4 Respostas 4
cbarley
Alunos da HubSpot
Alunos da HubSpot

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

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

CoderAcademy
Participante

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

Hey Connor,

 

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

 

Cheers,

 

James.

0 Avaliação positiva
cbarley
Alunos da HubSpot
Alunos da HubSpot

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

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!

0 Avaliação positiva
CoderAcademy
Participante

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

You're a champion,

 

Thanks.

0 Avaliação positiva