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

Why do I get 401 as API response when adding query string to request url?

lebenitolebenito Member Posts: 15
I am using the client.api_client.request(method, url=url, query_params=params, headers=headers, body=payload) from the python client.
Other API get and post calls work just fine.
When I try to export an stl or get the mass properties of a part studio it works just fine until I put a query string in the request url for example the configuration,
but other query parameters also do not work. It says "message":"Unauthenticated API request", "status":401

This works though when I put the link manually in my browser where I am logged into my Onshape account.

But my shadedView api call works with a query string. The query strings are formatted and encoded the exact same way, so I do not understand why this call works with query parameters but stl and mass properties do not.
For the stl I already got told a work around with translations, but I cant find such work around for the massproperties.
Why is that happening or is there maybe also a work around for the mass properties?





Answers

Sign In or Register to comment.