Skip to content

Instantly share code, notes, and snippets.

@locnguyen
Created February 28, 2014 21:48
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 locnguyen/9280712 to your computer and use it in GitHub Desktop.
Save locnguyen/9280712 to your computer and use it in GitHub Desktop.
Sample SignNow API usage
Create a new user with base 64 encoded client credentials...
curl -H 'Authorization: Basic MGZjY2RiYzczNTgxY2EwZjliZjhjMzc5ZTZhOTY4MTM6MzcxOWExMjRiY2ZjMDNjNTM0ZDRmNWMwNWI1YTE5NmI=' --data '{"email":"lnguyen@mailinator.com", "password": "x"}' -X POST https://capi-eval.signnow.com/api/user
Create an oauth2 token for the new user
curl -H 'Authorization: Basic MGZjY2RiYzczNTgxY2EwZjliZjhjMzc5ZTZhOTY4MTM6MzcxOWExMjRiY2ZjMDNjNTM0ZDRmNWMwNWI1YTE5NmI=' --data 'username=lnguyen@mailinator.com&password=x&scope=*&grant_type=password' https://capi-eval.signnow.com/api/oauth2/token
Create a new document for that user with his oauth2 token
curl -H 'Authorization: Bearer be933cbc0ebe63f8d636a517f23feb4826ceef67b5f29a12896d40cd0e9dd4c0' -F 'file=snlogo.png' https://capi-eval.signnow.com/api/document
Get a list of the user's documents
curl -H 'Authorization: Bearer be933cbc0ebe63f8d636a517f23feb4826ceef67b5f29a12896d40cd0e9dd4c0' https://capi-eval.signnow.com/api/user/documentsv2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment