I’m trying to convert DWF to DXF using Curl on https://api.aspose.cloud/v3.0/cad/Convert?outputFormat=DXF but keep getting error:
Operation Failed. The authorization data is incorrect.
How do I fix this issue?
I’m trying to convert DWF to DXF using Curl on https://api.aspose.cloud/v3.0/cad/Convert?outputFormat=DXF but keep getting error:
Operation Failed. The authorization data is incorrect.
How do I fix this issue?
Hi,
Is there an update on this?
I’m still getting the same error. This is the curl command I’m using
curl -X POST “https://api.aspose.cloud/v3.0/cad/Convert?outputFormat=DXF” -H “accept: application/json” -H “Authorization: Bearer ey…5w” -H “Content-Type: multipart/form-data” -H “x-aspose-client: Containerize.Swagger” -F “drawing”=“file.dwf”
@yiliu77,
could you please check if Bearer token generated from ‘https://id.aspose.cloud/connect/token’ resolves the issue?
Hey that resolved one of the issues. Now I’m getting an internal server error.
I’ve also tried the following code which also resulted in an internal server error
from asposecadcloud import CadApi
from asposecadcloud.models.requests import ConvertRequest
cad_api = CadApi(‘’, ‘’)
request = ConvertRequest(“floor.dwf”, “dxf”)
cad_api.convert(request)
See https://download.autodesk.com/us/samplefiles/acad/blocks_and_tables.dwf.
This is the error I keep seeing: (‘500 Error connecting to the API https://api.aspose.cloud/v3.0/cad/Convert?outputFormat=dxf; Message: Internal Server Error’, 500, None)
@yiliu77,
I can confirm the issue with this file, unfortunately, we have created CADCLOUD-512 to investigate and fix it.
I got the same error for any request I made :
Operation Failed. The authorization data is incorrect
I navigate to : “Aspose.CAD Cloud - API References”
add my app id and secret id; I can also get my access token through token api it works.
But once I test the api eiher through curl or the sdk I get this error : Operation Failed. The authorization data is incorrect
Conversion error: Error: Conversion failed: Unauthorized - {"requestId":"d172973c4fd245afe64797134468bf01","error":{"code":"errorAuthorization","message":"Unauthorized","description":"Operation Failed. The authorization data is incorrect.","dateTime":"2024-12-03T10:48:04.2201802Z"}}
@bil168,
Hi.
Could you please share the details of the request (without secrets) so we can try it on our side?
Hi thank you!
I just went to : Aspose.CAD Cloud - API References
Connect with credentials.
Token URL: https://api.aspose.cloud/connect/token
Flow: application
Client Id:******
Client Secret:******
Then make several request/(post & get) for example:
curl -X POST "https://api.aspose.cloud/v3.0/cad/Convert?outputFormat=OBJ" -H "accept: application/json" -H "authorization: Bearer xxx" -H "Content-Type: multipart/form-data" -H "x-aspose-client: Containerize.Swagger" -d {"drawingData":{}}
I get this result :
{
"requestId": "01daa4b91635a533a8c1d7893ee6d0c0",
"error": {
"code": "errorAuthorization",
"message": "Unauthorized",
"description": "Operation Failed. The authorization data is incorrect.",
"dateTime": "2024-12-10T10:37:45.0395997Z"
}
}
My account is active, I added my credit card
Thank you for your fast reply -
Both works:
with id.aspose.cloud:
curl -X POST "https://id.aspose.cloud/connect/token" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials&client_id=XXX&client_secret=XXX"
{"access_token":"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.XXXX","expires_in":3600,"token_type":"Bearer"}%
and here :
curl -X POST "https://api.aspose.cloud/connect/token" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials&client_id=XXX&client_secret=XXX"
{"access_token":"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.XXXX","expires_in":3600,"token_type":"Bearer"}%
Thank you so much