Bearer Token Connections
Stores and manages bearer token credentials for an integration. See Understanding connections.
JSON format
Bearer Token Connections are represented as JSON objects with the following properties:
Name | Type | Read-only | Mandatory | Description |
---|---|---|---|---|
allowed_domain | string | false | true | Hostname the connection can be used on. See Allowed domain |
created_at | string | true | false | When the connection was created |
name | string | false | true | Name used to uniquely identify the connection. See Connection names |
token | string | false | true | Bearer token. For security purposes, this value is redacted in responses |
updated_at | string | true | false | When the connection was last updated |
Create Bearer Token Connection
POST /api/services/zis/integrations/{integration}/connections/bearer_token
Creates a bearer token connection for the integration.
Authentication
You can authorize requests using a ZIS OAuth access token. A Zendesk app can also authorize requests to this endpoint using an admin's browser session. See Making API requests from a Zendesk app.
Parameters
Name | Type | In | Required | Description |
---|---|---|---|---|
integration | string | Path | true | Name of the integration |
Example body
{
"allowed_domain": "api.example.com",
"name": "my_bearer_token_connection",
"token": "MY_BEARER_TOKEN"
}
Using cURL
curl https://{subdomain}.zendesk.com/api/services/zis/integrations/{integration}/connections/bearer_token \
-H "Authorization: Bearer {access_token}" \
-X POST \
-H 'content-type: application/json' \
-d '{
"name": "my_bearer_token_connection",
"token": "MY_BEARER_TOKEN",
"allowed_domain": "api.example.com"
}'
Example response(s)
201 Created
Status 201 Created
{
"bearer_token": {
"allowed_domain": "api.example.com",
"created_at": "1985-04-12T23:20:50.52Z",
"name": "my_bearer_token_connection",
"token": "*****",
"updated_at": "1985-04-12T23:20:50.52Z"
}
}
400 Bad Request
Status 400 Bad Request
{
"errors": [
{
"code": "InvalidIntegration",
"title": "Specified integration is not valid"
}
]
}
401 Unauthorized
Status 401 Unauthorized
{
"errors": [
{
"code": "InvalidCredentials",
"title": "Token length is invalid"
}
]
}
403 Forbidden
Status 403 Forbidden
{
"errors": [
{
"code": "Forbidden",
"title": "Cannot access this resource. Missing scope write"
}
]
}
409 Conflict
Status 409 Conflict
{
"errors": [
{
"code": "Conflict",
"title": "Resource conflict"
}
]
}
429 Too Many Requests
Status 429 Too Many Requests
{
"errors": [
{
"code": "TooManyRequests",
"title": "Too many requests"
}
]
}
Show Bearer Token Connection
GET /api/services/zis/integrations/{integration}/connections/bearer_token/{name}
Returns the details of a bearer token connection.
Authentication
You can authorize requests using a ZIS OAuth access token. A Zendesk app can also authorize requests to this endpoint using an admin's browser session. See Making API requests from a Zendesk app.
Parameters
Name | Type | In | Required | Description |
---|---|---|---|---|
integration | string | Path | true | Name of the integration |
name | string | Path | true | Name of the bearer token connection |
Using cURL
curl https://{subdomain}.zendesk.com/api/services/zis/integrations/{integration}/connections/bearer_token/{name} \
-H "Authorization: Bearer {access_token}"
Example response(s)
200 OK
Status 200 OK
{
"bearer_token": {
"allowed_domain": "api.example.com",
"created_at": "1985-04-12T23:20:50.52Z",
"name": "my_bearer_token_connection",
"token": "*****",
"updated_at": "1985-04-12T23:20:50.52Z"
}
}
401 Unauthorized
Status 401 Unauthorized
{
"errors": [
{
"code": "InvalidCredentials",
"title": "Token length is invalid"
}
]
}
403 Forbidden
Status 403 Forbidden
{
"errors": [
{
"code": "Forbidden",
"title": "Cannot access this resource. Missing scope write"
}
]
}
404 Not Found
Status 404 Not Found
{
"errors": [
{
"code": "NotFound",
"title": "Connection does not exist"
}
]
}
429 Too Many Requests
Status 429 Too Many Requests
{
"errors": [
{
"code": "TooManyRequests",
"title": "Too many requests"
}
]
}
Update Bearer Token Connection
PATCH /api/services/zis/integrations/{integration}/connections/bearer_token/{name}
Updates the details of a bearer token connection.
Authentication
You can authorize requests using a ZIS OAuth access token. A Zendesk app can also authorize requests to this endpoint using an admin's browser session. See Making API requests from a Zendesk app.
Parameters
Name | Type | In | Required | Description |
---|---|---|---|---|
integration | string | Path | true | Name of the integration |
name | string | Path | true | Name of the bearer token connection |
Example body
{
"token": "MY_BEARER_TOKEN"
}
Using cURL
curl https://{subdomain}.zendesk.com/api/services/zis/integrations/{integration}/connections/bearer_token/{name} \
-H "Authorization: Bearer {access_token}" \
-X PATCH \
-H 'content-type: application/json' \
-d '{
"token": "MY_BEARER_TOKEN"
}'
Example response(s)
204 No Content
Status 204 No Content
400 Bad Request
Status 400 Bad Request
{
"errors": [
{
"code": "InvalidIntegration",
"title": "Specified integration is not valid"
}
]
}
401 Unauthorized
Status 401 Unauthorized
{
"errors": [
{
"code": "InvalidCredentials",
"title": "Token length is invalid"
}
]
}
403 Forbidden
Status 403 Forbidden
{
"errors": [
{
"code": "Forbidden",
"title": "Cannot access this resource. Missing scope write"
}
]
}
404 Not Found
Status 404 Not Found
{
"errors": [
{
"code": "NotFound",
"title": "Connection does not exist"
}
]
}
429 Too Many Requests
Status 429 Too Many Requests
{
"errors": [
{
"code": "TooManyRequests",
"title": "Too many requests"
}
]
}
Delete Bearer Token Connection
DELETE /api/services/zis/integrations/{integration}/connections/bearer_token/{name}
Deletes a bearer token connection.
Authentication
You can authorize requests using a ZIS OAuth access token. A Zendesk app can also authorize requests to this endpoint using an admin's browser session. See Making API requests from a Zendesk app.
Parameters
Name | Type | In | Required | Description |
---|---|---|---|---|
integration | string | Path | true | Name of the integration |
name | string | Path | true | Name of the bearer token connection |
Using cURL
curl https://{subdomain}.zendesk.com/api/services/zis/integrations/{integration}/connections/bearer_token/{name} \
-H "Authorization: Bearer {access_token}" \
-X DELETE
Example response(s)
204 No Content
Status 204 No Content
401 Unauthorized
Status 401 Unauthorized
{
"errors": [
{
"code": "InvalidCredentials",
"title": "Token length is invalid"
}
]
}
403 Forbidden
Status 403 Forbidden
{
"errors": [
{
"code": "Forbidden",
"title": "Cannot access this resource. Missing scope write"
}
]
}
404 Not Found
Status 404 Not Found
{
"errors": [
{
"code": "NotFound",
"title": "Connection does not exist"
}
]
}
429 Too Many Requests
Status 429 Too Many Requests
{
"errors": [
{
"code": "TooManyRequests",
"title": "Too many requests"
}
]
}