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.

Using API, onshape_client and OAuth


How do you properly generate a token for authorization?

When I create a client and try to read an access token, the access_token variable returns blank

# modules
from onshape_client import OnshapeElement, Client

# variables
config_filename = '.onshape_client_config.yaml'
did = '4106f8fea9cf4607edeba1db'
wid = 'c11cf0ae6ab5e6297d09562d'
eid = '3340d6f3b50b6e32e22d9a3b'

# do things
client = Client( config_filename )<br>

&gt;&gt;&gt; client.configuration.access_token

Thank you!

Sign In or Register to comment.