Skip to content

Instantly share code, notes, and snippets.

@groupdocscloud
Last active April 23, 2019 07:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save groupdocscloud/5f3f6ef44a0ac2643ac8ebb9c032f586 to your computer and use it in GitHub Desktop.
Save groupdocscloud/5f3f6ef44a0ac2643ac8ebb9c032f586 to your computer and use it in GitHub Desktop.
This Gist contains examples of GroupDocs.VIewer Cloud cURL V2
Viewer-cURL-V2
### Create view
curl --request POST \
'https://api.groupdocs.cloud/v2/viewer/view' \
--header 'authorization: Bearer [ACCESS_TOKEN]' \
--header 'Content-Type: application/json' \
--data '{
"FileInfo": {
"FilePath": "one-page.docx"
},
"RenderOptions": {
"IsResponsive": true
}
}'
### Download Result
curl --request GET \
'https://api.groupdocs.cloud/v2/viewer/storage/file/viewer/one-page_docx/p1.html' \
--header 'authorization: Bearer [ACCESS_TOKEN]' \
### Retrieve access token
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/viewer/storage/file/one-page.docx' \
--header 'authorization: Bearer [ACCESS_TOKEN]' \
--data-binary @"c:\temp\one-page.docx"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment