Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- Be respectful, on topic and if you see a problem, Flag it.
If you would like to contact our Community Manager personally, feel free to send a private message or an email.
What is the OAUTH authorization code lifetime ?
Rufus31415
Member, Developers Posts: 18 ✭✭
Best Answers
-
awk Member, Onshape Employees, Developers Posts: 78The OAuth bearer token expires 60 minutes after it's first issued. The 'nonce' (the code used in combination with the OAuth client ID and OAuth Client secret to obtain a bearer token) expires after approx 3 minutes.
Beware that if you repeated obtain a bearer token for the same grant in quick succession you'll get the same token with a decreasing expiration:
Ask for a bearer token at noon, and you'll get one that expires at 13:00
Ask for the same bearer token at 12:15 and you'll get the same one that still expires at 13:00 (45 minutes time)
Ask for the same bearer token at 12:59 and you'll still get the same one that expires at 13:00 (in one minute)
More details are available in the developer portal (use the help menu to get the documentation and review the OAuth section)Director of API, Appstore, and App Partner Technical Support6
Answers
Beware that if you repeated obtain a bearer token for the same grant in quick succession you'll get the same token with a decreasing expiration:
Ask for a bearer token at noon, and you'll get one that expires at 13:00
Ask for the same bearer token at 12:15 and you'll get the same one that still expires at 13:00 (45 minutes time)
Ask for the same bearer token at 12:59 and you'll still get the same one that expires at 13:00 (in one minute)
More details are available in the developer portal (use the help menu to get the documentation and review the OAuth section)
!