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.
it possible to get a constant token for working with rest api???????
Sergei_krasovskii
Member Posts: 3 PRO
i through the server the option with constant updating after 60 minutes is not suitable
0
Answers
You could store the refresh token, and get the new bearer token whenever the last one runs out. Alternatively, if the user is signed in to Onshape, and already has granted your app permissions, asking them to go through the OAuth workflow is actually transparent to them. When needing OAuth, you would just redirect their browser to the OAuth url, and if you have it setup correctly, the browser can walk through the whole process without ever notifying the user. This is better than storing the refresh token because if your system ever leaked the refresh token, that is a bad security breach, but the access token isn't as bad because of the shorter timeframe.
Hope that helps!