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.
API Explorer Authentication Trouble
zachary_hudson791
Member Posts: 3 ✭
Hi All,
I'm new to both OnShape and the Developer Portal and I'm having some difficulty testing REST calls using the API Explorer app. I am getting a 401 response every time I try to run a REST call with any type of OAuth requirement.
So far I have tried creating an API Key through the developer portal with all the OAuth permissions that I would need. I used that API Key to attempt a call and I get the 401 regardless of which call I test (using the "Try me" feature). Do I need to create an OAuth Application in the developer portal to be able to use this? Am I able to use the API Explorer as a standalone testing tool? If I need to connect the API Explorer using the OAuth Application tool in the developer portal, what do I need for the OAuth and Redirect URLs? Any pointers would be helpful.
Thanks!
I'm new to both OnShape and the Developer Portal and I'm having some difficulty testing REST calls using the API Explorer app. I am getting a 401 response every time I try to run a REST call with any type of OAuth requirement.
So far I have tried creating an API Key through the developer portal with all the OAuth permissions that I would need. I used that API Key to attempt a call and I get the 401 regardless of which call I test (using the "Try me" feature). Do I need to create an OAuth Application in the developer portal to be able to use this? Am I able to use the API Explorer as a standalone testing tool? If I need to connect the API Explorer using the OAuth Application tool in the developer portal, what do I need for the OAuth and Redirect URLs? Any pointers would be helpful.
Thanks!
0
Comments
You need to get API explorer to work before moving on. I still use it to see how an API works and look at what it returns.
There's a lot of requirements needed to get a response and the API explorer is the best tool to complete the operation.
Once you get it working, then you can begin your oauth.
Oauth is used when you write an app for someone else's account. In this, they have to give you permission.
There's another authentication to access your account which isn't as difficult. There's a github example showing how to use it.
Steps to API:
1 get API explorer working
2 get logging into your account working (github examples)
3 lastly oauth, rule the domains of others