Connections
Every connection should have a way to check if the used API key (token) is valid (a validation endpoint).
This means that each connection should have a part that uses the API key (token) against an endpoint that requires only the API key to run. For example, a user info endpoint, or any endpoint that is used to list data.
The validation endpoint is located:
OAuth1 and OAuth2 - in the
infodirectiveAPI key, basic auth, digest auth, other - in the
urlin the Communication tab

{
"authorize": {
...
},
"token": {
...
},
"info": {
"url": "https://api.dropboxapi.com/2/users/get_current_account",
"method": "POST",
"headers": {
"authorization": "Bearer {{connection.accessToken}}"
},
"body": "{{null}}",
"response": {
"uid": "{{body.account_id}}",
"metadata": {
"type": "email",
"value": "{{body.email}}"
},
"error": {
"message": "[{{statusCode}}] {{if(body.error_summary, body.error_summary, body)}}"
},
"data": {
"root_namespace_id": "{{body.root_info.root_namespace_id}}"
}
},
"log": {
"sanitize": [
"request.headers.authorization"
]
}
},
"invalidate": {
...
}
}Error handling
Error handling in connections follows the same rules as error handling in the base.
The only difference is where you define it. For example, in OAuth 2.0 connections, define the error directive in the response of the info directive, and of other requests such as token, if needed.
Last updated

