Access token issue with Aspose.CAD REST API

I have created storage and application on the free trial plan. And tried to use the client with id and secret which is shown on the application window. Look at the attachment.

While i tried this , i get nothing when i try to take https://api.aspose.cloud/oauth2/token using grant_type=client_credentials , I get empty response , am I missing something here , Also i see some user actually published his client_id and secret , which worked for me.

We intend to buy a subscription , if i can make it work using some others users id and secret does not suit me.

Can someone please help ?

image.png (27.3 KB)

this is the curl output that i get when i use the client id and secret , given on the application window

POST /oauth2/token HTTP/2
Host: api.aspose.cloud
user-agent: curl/7.68.0
content-type: application/x-www-form-urlencoded
accept: application/json
content-length: 123

  • Connection state changed (MAX_CONCURRENT_STREAMS == 128)!
  • We are completely uploaded and fine
    < HTTP/2 200
    < date: Wed, 11 Aug 2021 22:10:24 GMT
    < content-length: 0
    < server: Microsoft-IIS/10.0
    < x-powered-by: ASP.NET
    <
  • Connection #0 to host api.aspose.cloud left intact

@shyamjoshi

We are sorry for the inconvenience. Recently we have implemented Aspose.CAD Cloud as a microservice with new API Version V3 and it supports JWT access token instead of OAuth2. Please find a sample cURL command for the JWT Access token. We are in the process to update the documentation. Please feel free to contact us for any further assistance.

# Get Customer Key and Customer ID from https://dashboard.aspose.cloud/
curl -X POST "https://api.aspose.cloud/connect/token" -d "grant_type=client_credentials&client_id=xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx&client_secret=xxxxxxxxxxxxxxxxxxxxxx" -H "Content-Type: application/x-www-form-urlencoded" -H "Accept: application/json"

Hi , This worked for me. to get token but the code to convert fails saying
{“Message”:“Authentication failed!”}

The url i am making request to is https://api.aspose.cloud/v1.1/cad/saveAs?format=jpeg

@shyamjoshi

Please pay attention to my above reply. As shared above Aspose.CAD Cloud uses API Version 3.0. So please use API Version 3.0 instead of 1.1. You may explore Aspose.CAD REST APIs in your browser using API reference page.

​POST /cad​/saveAs​/{outputFormat} Export existing drawing to another format. Drawing data is passed as zero-indexed multipart/form-data content or as raw body stream.

Thank you , i managed to make this work , still having quality issues , Client wants this since google already does this on email.

The quality of google seems to be better then aspose anyway i can get same quality with aspose ?

@shyamjoshi

Please check your following thread for the quality issue.