Free Support Forum - aspose.cloud

Cloud API to convert Word Document


#1

Checking out the Aspose Cloud at the moment using the trial and having issues attempting to convert a Word document to a PDF using the REST API.

Using a REST test client with the call below and attaching a docx file to the request, but getting a 403 Forbidden request. I’ve created my App in the cloud portal and the App SID and App Key are correct in the request. Is anyone able to tell me what I’m missing in my request?

https://api.aspose.cloud/v1/words/convert?appsid=222e8e09-0c9d-42fa-98b4-233a653af97b&appkey=xxxxxxxxxxxxx&format=PDF

Cheers
Cliff


#2

Dear Cliff,

Thank you for contacting Aspose Support.

It appears you are not signing the URL incorrectly. The format for the resource URL is usually http://api.aspose.cloud/v1.1/words/{resource-url}?appSid={apps-id}&signature={signiture}. I have attached a sample JAVA application as an example as to how to do so URLGeneratorExample.java.zip (1.2 KB).

To convert a Word document to PDF you can use the following example

curl -v "http://api.aspose.com/v1.1/words/SampleWordDocument.docx?format=pdf&appSid=XXXX&signature=XXX" \
     -X GET \
     -H "Content-Type: application/json"

You can read more about the various means for converting from Word to other formats in out Converting a Document developer guide page.

Thank You.

Mateen Sajjad