How to authenticate Aspose REST API Requests to manipulate Office file formats in Cloud

I’m just testing the cloud API but i cannot find how to pass the SID and KEY is this in the header? i found this in the developer ref notes but it seems to be missing the examples in Authenticating API Requests|Documentation

Dear Measleboy,

Thank you for contacting Aspose Support.

Our documentation is currently in the process of been updated, we apologize for the inconvenience this may have caused.

I assume you have already obtained your cloud APP ID and SID, if you have not then you can easily obtain one by signing up at https://www.aspose.cloud/.

Once you have you APP ID and SID you can create a resource URL by using the sample application i have attached to this thread, and then using cURL or the language of your choice to communicate with our platform. You can visit https://reference.aspose.cloud/ to understand resource URL for each API operation.

Apart from this, we have a full range of SDKs with accompanying examples and developer guides to easily understand and integrate into your application. Can you let me know your target use case and I can point you to the relevant sections in our developer guide along with ready to run examples deployed on GitHub ?

Kind Regards,

Mateen Sajjad
Aspose - File Format APIs.

Got a Complaint? File it!

Keep in touch! We’re on Twitter and Facebook

Hi Mateen,

thank you, just a quick note. can you just let me know if im formatting the URL correctly in this case i am trying to return the file list from my root folder. I have an App SID and App Key

so this is what im using

http://api.aspose.com/v1.1/storage/folder?appSID=xxxx&signature=xxxx

but i getting this returned

Authentication failed!

i just tried another example and used a different AppSID and AppKey with a test pptx i added to root storage

http://api.aspose.cloud/v1.1/slides/Nylika.pptx/slides?appSid=xxxx&format=jpeg&signature=xxxx

same again

Authentication failed!

Sorry…my mistake i have realized my error. thanks all working and thanks for the quick response

Dear Measleboy,

Thank You for contacting Aspose Support.

An error Authentication failed! usually means you are not generating your application signature correctly. The https://api.aspose.com/v1.1/storage/folder?appsid=xxxx&signature=xxxx is correctly formatted, but off course you have to use correct values in the URL.

You can read more about accessing files from Aspose Cloud Storage by reading our developer guide on Getting a List of files from Cloud Storage . For reference the cURL command to read files is as follows

curl -v https://api.aspose.cloud/v1.1/storage/folder/{path}?appsid=xxxx&signature=xxxx -X GET -H "Content-Type: application/json" -H "Accept: application/json"

If you share you APP KEY and SID in a private message i can help you in creating the request you need. Please note the signature portion of the request is SHA1 hash of the resource URL.

Kind Regards,

Mateen Sajjad
Aspose - File Format APIs.

Got a Complaint? File it!

Keep in touch! We’re on Twitter and Facebook

@Measleboy

Please note the latest APIs of Aspose Cloud are using Json Web Token(JWT) for request authentication. And all the APIs have their own storage API methods. So there is no need to use Aspose.Storage Cloud API any more while using the latest API Versions of Aspose Cloud APIs. Please find sample code for generating JWT token and uploading a file to default cloud storage using Aspose.Words Cloud API.

// First get Access Token
// Get App Key and App SID from https://dashboard.aspose.cloud/
curl -X POST "https://api.aspose.cloud/connect/token" 
-d "grant_type=client_credentials&client_id=xxxxx-xxxx-xxxxx-xxxxx-xxxxxxxxxx&client_secret=xxxxxxxxxxxxxxxxxxxxxxxxxxx" 
-H "Content-Type: application/x-www-form-urlencoded" 
-H "Accept: application/json"

//upload file to storage
curl -X PUT "https://api.aspose.cloud/v4.0/words/storage/file/Test.docx" 
-H "accept: application/json" 
-H "Authorization: Bearer [Access_Token]" 
-H "Content-Type: multipart/form-data" 
-F "filecontent=@C:/Temp/Test.docx"