Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.