Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. 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.

Options

it possible to get a constant token for working with rest api???????


i through the server the option with constant updating after 60 minutes is not suitable

Answers

  • Options
    Ethan_KEthan_K Member, Onshape Employees Posts: 57
    Hi Sergei,

    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!
Sign In or Register to comment.