Receiving an error when using smexportonshape()
이전 댓글 표시
I'm getting this error when using smexportonshape('URL'):
Error using smexportonshape_implementation
The server returned the status 403 with message "Forbidden" in response to the request to URL
https://cad.onshape.com/api/documents/d/047de99251bde16077b76a54/externaldata/61e8f2ac20a81e220f284256.
Error in smexportonshape_implementation
Error in smexportonshape_implementation
Error in smexportonshape_implementation
Error in smexportonshape_implementation
Error in smexportonshape (line 38)
xmlFileName = smexportonshape_implementation(url, varargin{:});
following the link gives this message:
"{"message":"Unauthenticated API request", "status":401}"
Any help is appreciated!
댓글 수: 2
mouad boumediene
2022년 5월 26일
i have the same problem, did you solve it yet ?
Tobias Wolf
2022년 6월 27일
Same problem here
답변 (1개)
Shivam
2024년 1월 2일
0 개 추천
Hi,
Based on your shared details, I understand that when attempting to use the 'smexportonshape' function with the given URL, the server responds with a 403 status code, indicating "forbidden." Additionally, when you try to access the URL directly through a web browser, you encounter a 401 status code with the message stating an "Unauthenticated API request."
It's important to recognize that a 403 Forbidden status code means that the server understands your request but is declining to fulfill it. This usually happens if the user lacks the necessary permissions for the resource.
According to the documentation, you must initially grant Simscape Multibody Link access to your Onshape account when using the 'smexportonshape' function for the first time. Doing so allows the Onshape platform to provide the function with access through Javascript tokens, which secure your login details.
Please refer to the following documentation to know more about the 'smexportonshape' function and its use: https://in.mathworks.com/help/releases/R2023b/sm/ref/smexportonshape.html
I hope it helps.
Thanks
카테고리
도움말 센터 및 File Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!