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.
Getting starting in C#
alan_baljeu
Member, User Group Leader Posts: 111 ✭✭
Since I last was here, I figured out how to get the API keys. Now I have downloaded from git OnshapeWindowsSample. I set the environment variables as instructed here:
https://github.com/onshape-public/app-windows-sample
(Open question: the image says partner.dev.onshape.com, but the text says cad.onshape.com. Which is right?).
When I run the C# console app, I get in the web browser the json below. What do I need to do to get this working? URL: https://oauth.onshape.com/oauth/authorize?response_type=code&client_id=....&&grant_type=authorization_code&redirect_uri=http://localhost:9326
https://github.com/onshape-public/app-windows-sample
(Open question: the image says partner.dev.onshape.com, but the text says cad.onshape.com. Which is right?).
When I run the C# console app, I get in the web browser the json below. What do I need to do to get this working? URL: https://oauth.onshape.com/oauth/authorize?response_type=code&client_id=....&&grant_type=authorization_code&redirect_uri=http://localhost:9326
{ "moreInfoUrl" : "", "message" : "error=\"invalid_grant\", error_description=\"Application requested an invalid redirect URL http://localhost:9326\"", "status" : 400, "code" : 0 }
Creating knowledge-driven design automation software, for molds, etc.
www.virtualmold.com
www.virtualmold.com
Tagged:
0
Answers
The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.
If you think this is a server error, please contact the webmaster.
Error 404
localhost
Apache/2.4.37 (Win32) OpenSSL/1.1.1 PHP/7.2.12
</code>So then I created a folder in my htdocs, called onshape-test, and I get:</pre></span><br><h1>Index of /onshape-test</h1><table><tbody><tr><th><img alt="ICO" src="http://localhost/icons/blank.gif"></th><th><a rel="nofollow" href="http://localhost/onshape-test/?C=N;O=D">Name</a></th><th><a rel="nofollow" href="http://localhost/onshape-test/?C=M;O=A" title="Link: http://localhost/onshape-test/?C=M;O=A">Last modified</a></th><th><a rel="nofollow" href="http://localhost/onshape-test/?C=S;O=A">Size</a></th><th><a rel="nofollow" href="http://localhost/onshape-test/?C=D;O=A">Description</a></th></tr><tr><th colspan="5"><hr></th></tr><tr><td><img alt="PARENTDIR" src="http://localhost/icons/back.gif"></td><td><a rel="nofollow" href="http://localhost/">Parent Directory</a></td><td> </td><td class="post-text-align-right">-</td><td> </td></tr><tr><th colspan="5"><hr></th></tr></tbody></table><div>Apache/2.4.37 (Win32) OpenSSL/1.1.1 PHP/7.2.12 Server at localhost Port 80<br><br></div><pre class="CodeBlock"><code><div>Is there more to this test app or where do I go from here?</div><p></p>
www.virtualmold.com
but, onshape-test is a folder, not a program. What am I missing?
www.virtualmold.com