Skip to main content
Question

revoking or setting expiration on downscope tokens

  • May 22, 2025
  • 1 reply
  • 13 views

Forum|alt.badge.img

We're using Box Content Preview and running into some issues around what happens when the downscoped token expires.

 

For testing and debugging purposes, I really don't want to have to wait an hour after token exchange to find out whether my expiration-handling code is going to work.

 

Can I specify the token's lifetime during token exchange? (I don't see it as an option in the token exchange request), or perhaps invalidate a previously issued token on command?

1 reply

Forum|alt.badge.img

Hi ,

 

Great question! Unfortunately you can't set the expiration directly at the time of creation, but you should be able to revoke a token manually:

https://developer.box.com/v2.0/reference#revoke

 

Thanks,

Jason