Last active
April 23, 2019 07:24
-
-
Save groupdocscloud/5f3f6ef44a0ac2643ac8ebb9c032f586 to your computer and use it in GitHub Desktop.
This Gist contains examples of GroupDocs.VIewer Cloud cURL V2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Viewer-cURL-V2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### 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 | |
} | |
}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Download Result | |
curl --request GET \ | |
'https://api.groupdocs.cloud/v2/viewer/storage/file/viewer/one-page_docx/p1.html' \ | |
--header 'authorization: Bearer [ACCESS_TOKEN]' \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### 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]' | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### 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