Receiving an error when using smexportonshape()

3 ビュー (過去 30 日間)
Elesey Razumovskiy
Elesey Razumovskiy 2022 年 1 月 20 日
回答済み: Shivam 2024 年 1 月 2 日
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
mouad boumediene 2022 年 5 月 26 日
i have the same problem, did you solve it yet ?
Tobias Wolf
Tobias Wolf 2022 年 6 月 27 日
Same problem here

サインインしてコメントする。

回答 (1 件)

Shivam
Shivam 2024 年 1 月 2 日
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

カテゴリ

Help Center および File ExchangeFoundation and Custom Domains についてさらに検索

製品


リリース

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by