Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
This Gist contains examples of GroupDocs.Conversion Cloud cURL V2
Conversion-cURL-V2
### Convert and Add Watermark
curl --request POST "https://api.groupdocs.cloud/v2.0/conversion"
--header "authorization: Bearer [ACCESS_TOKEN]"
--header "accept: application/json"
--header "Content-Type: application/json" --data "{ "FilePath": "test_doc.docx", "Format": "pdf", "ConvertOptions": { "FromPage": 1, "PagesCount": 1, "WatermarkOptions": { "text": "Watermark" } }, "OutputPath": "Output"}"
### Download Result
curl --request GET "https://api.groupdocs.cloud/v2/conversion/storage/file/Output/test_doc.pdf'
--header "authorization: Bearer [ACCESS_TOKEN]
### Retrieve access token
### TODO: Get your AppSID and AppKey at https://dashboard.groupdocs.cloud (free registration is required).
curl --request POST https://api.groupdocs.cloud/connect/token
--header "Content-Type: application/x-www-form-urlencoded"
--data "grant_type=client_credentials&client_id=[APP_SID]&client_secret=[APP_KEY]"
### Upload file into the storage
curl --request POST "https://api.groupdocs.cloud/v2/conversion/storage/file/test_doc.docx"
--header "authorization: Bearer [ACCESS_TOKEN]"
--data-binary @"c:\temp\test_doc.docx"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.