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

lebenito
lebenito 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