There are two methods to authenticate the GoCanvas API (application program interface).
Configuring API Keys
By default, each call placed to the API accepts the username and password of an authorized GoCanvas user as required parameters. The second option is to set up an API Key at the account or department level and pass a token inside the header of your request with a username as the parameter.
- Go to Account Settings by expanding the Account drop down in the left navigation. Remember to switch to All if Departments are enabled.
- Scroll down to the Security Settings and select Settings by API Keys.
- On this page, check the box to Enable API Keys and then Create API Key.
- Enter a Key Name and Save.
- GoCanvas will generate a unique API Key that you must copy and store somewhere safe to use in your API calls. Characters will not be blurred as seen in this image.
Note
If you utilize Departments in your account, you will specify which Department the API Key is associated with upon creating the API Key. If you choose "All", the token will have access to all Department data.
Once you have created the API Key, you will use API calls by passing the token inside the header of your request. The username parameter is mandatory, otherwise a "Permission Denied for the requested resource" error will be returned by the API calls.
Please Note
When you use API Keys, you'll no longer be able to access the API (including Zapier) with just your username and password.
curl -H "Authorization: Bearer NapDjG*****************************************"
localhost:3000/apiv2/forms.xml -F 'username=test_user@gocanvas.com'
Request Headers:
Authorization: "Bearer NapDjG**************************************"
Request Body:
username: "test_user@gocanvas.com"
Did we answer your question?
Please let us know by voting below. All we ask is if you downvote, please let us know how the content can be improved in the comments!
Comments
0 commentsPlease sign in to leave a comment.