Receiving an error when using smexportonshape()

3 visualizaciones (últimos 30 días)
Elesey Razumovskiy
Elesey Razumovskiy el 20 de En. de 2022
Respondida: Shivam el 2 de En. de 2024
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 comentarios
mouad boumediene
mouad boumediene el 26 de Mayo de 2022
i have the same problem, did you solve it yet ?
Tobias Wolf
Tobias Wolf el 27 de Jun. de 2022
Same problem here

Iniciar sesión para comentar.

Respuestas (1)

Shivam
Shivam el 2 de En. de 2024
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

Categorías

Más información sobre Foundation and Custom Domains en Help Center y File Exchange.

Productos


Versión

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by