Skip to main content
Question

Always getting "The authorization code has expired" error when trying to get authorization token

  • May 22, 2025
  • 1 reply
  • 72 views

Forum|alt.badge.img

After getting the token using https://account.box.com/api/oauth2/authorize?client_id=ba89q5jnqdi31o2uossdspldrawju3mh&response_type=code when I try to send a POST token request, I get the error

{
"error": "invalid_grant",
"error_description": "The authorization code has expired"
}

Although, I try it right away, within 5 seconds

1 reply

Forum|alt.badge.img

Hello, 

The only condition that can lead to this error is if 30 seconds have passed before the authorization code is used. I confirmed that there are no other customers currently reporting this issue and I was not able to reproduce. 

Best, 

Kourtney, Box Developer Advocate