Stores and manages OAuth clients for an integration. You use an OAuth client to create an OAuth connection. See Creating and managing OAuth connections

JSON format

OAuth Clients are represented as JSON objects with the following properties:

Name Type Read-only Mandatory Description
auth_url string false false The authorization URL of the OAuth provider
client_id string false true The client secret obtained from your OAuth provider
client_secret string false true The client secret obtained from your OAuth Provider
created_by string true false User who created the connection
default_scopes string false false A set of case-sensitive and space-delimited OAuth scopes
grant_type string false false Default grant type for the client's OAuth flows. Valid values are "authorization_code" and "client_credentials". Defaults to "authorization_code"
integration string false false The name of the integration.
token_url string false true The token URL of the OAuth provider to exchange for an access token
uuid string true false The UUID of the OAuth client

Show OAuth Clients

  • GET /api/services/zis/connections/oauth/clients/{integration}

Return details of all OAuth clients 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

Using cURL

curl https://{subdomain}.zendesk.com/api/services/zis/connections/oauth/clients/{integration} \-H "Authorization: Bearer {access_token}"

Example response(s)

200 OK
Status 200 OK
{  "clients": [    {      "auth_url": "https://client.int/auth",      "client_id": "my_client_id",      "client_secret": "my_client_secret",      "created_by": "test_user",      "default_scopes": "read write",      "grant_type": "authorization_code",      "integration": "my_integration",      "token_url": "https://client.int/tokens",      "uuid": "2fea765a-5ae4-4e3b-b457-a4f7836d041b"    }  ]}
401 Unauthorized
Status 401 Unauthorized
{  "errors": [    {      "code": "1200",      "detail": "Unauthorized",      "status": "401"    }  ]}
403 Forbidden
Status 403 Forbidden
{  "errors": [    {      "code": "1200",      "detail": "Forbidden",      "status": "403"    }  ]}
429 Too Many Requests
Status 429 Too Many Requests
{  "errors": [    {      "code": "1300",      "detail": "Too many requests",      "status": "429"    }  ]}

Create OAuth Client

  • POST /api/services/zis/connections/oauth/clients/{integration}

Creates an OAuth client.

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

{  "auth_url": "https://client.int/auth",  "client_id": "my_client_id",  "client_secret": "my_client_secret",  "default_scopes": "read write",  "grant_type": "authorization_code",  "name": "my_oauth_client_name",  "token_url": "https://client.int/tokens"}

Using cURL

curl https://{subdomain}.zendesk.com/api/services/zis/connections/oauth/clients/{integration} \-H "Authorization: Bearer {access_token}" \-X POST \-H 'content-type: application/json' \-d '{  "auth_url": "https://client.int/auth",  "client_id": "my_client_id",  "client_secret": "my_client_secret",  "grant_type": "authorization_code",  "default_scopes": "read write",  "name": "my_oauth_client",  "token_url": "https://client.int/tokens"}'

Example response(s)

200 OK
Status 200 OK
{  "uuid": "2fea765a-5ae4-4e3b-b457-a4f7836d041b"}
400 Bad Request
Status 400 Bad Request
{  "errors": [    {      "code": "1301",      "detail": "Invalid request",      "status": "400"    }  ]}
401 Unauthorized
Status 401 Unauthorized
{  "errors": [    {      "code": "1200",      "detail": "Unauthorized",      "status": "401"    }  ]}
403 Forbidden
Status 403 Forbidden
{  "errors": [    {      "code": "1200",      "detail": "Forbidden",      "status": "403"    }  ]}
422 Unprocessable Entity
Status 422 Unprocessable Entity
{  "errors": [    {      "code": "1303",      "detail": "Invalid value for: Integration. Desc: Integration cannot be nil",      "status": "422"    }  ]}
429 Too Many Requests
Status 429 Too Many Requests
{  "errors": [    {      "code": "1300",      "detail": "Too many requests",      "status": "429"    }  ]}

Show OAuth Client

  • GET /api/services/zis/connections/oauth/clients/{integration}/{client_uuid}

Return details for an OAuth client.

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
client_uuid string Path true The UUID of the OAuth client
integration string Path true Name of the integration

Using cURL

curl https://{subdomain}.zendesk.com/api/services/zis/connections/oauth/clients/{integration}/{client_uuid} \-H "Authorization: Bearer {access_token}"

Example response(s)

200 OK
Status 200 OK
{  "auth_url": "https://client.int/auth",  "client_id": "my_client_id",  "client_secret": "my_client_secret",  "created_by": "test_user",  "default_scopes": "read write",  "grant_type": "authorization_code",  "integration": "my_integration",  "token_url": "https://client.int/tokens",  "uuid": "2fea765a-5ae4-4e3b-b457-a4f7836d041b"}
401 Unauthorized
Status 401 Unauthorized
{  "errors": [    {      "code": "1200",      "detail": "Unauthorized",      "status": "401"    }  ]}
403 Forbidden
Status 403 Forbidden
{  "errors": [    {      "code": "1200",      "detail": "Forbidden",      "status": "403"    }  ]}
404 Not Found
Status 404 Not Found
{  "errors": [    {      "code": "1302",      "detail": "Not found",      "status": "404"    }  ]}
429 Too Many Requests
Status 429 Too Many Requests
{  "errors": [    {      "code": "1300",      "detail": "Too many requests",      "status": "429"    }  ]}

Update OAuth Client

  • PATCH /api/services/zis/connections/oauth/clients/{integration}/{client_uuid}

Updates an OAuth client details.

Parameters

Name Type In Required Description
client_uuid string Path true The UUID of the OAuth client
integration string Path true Name of the integration

Example body

{  "auth_url": "https://client.int/auth",  "client_id": "my_client_id",  "client_secret": "my_client_secret",  "default_scopes": "read write",  "grant_type": "authorization_code",  "token_url": "https://client.int/tokens"}

Using cURL

curl https://{subdomain}.zendesk.com/api/services/zis/connections/oauth/clients/{integration}/{client_uuid} \-H "Authorization: Bearer {access_token}" \-X PATCH \-H 'content-type: application/json' \-d '{  "auth_url": "https://client.int/auth",  "client_id": "my_client_id",  "client_secret": "my_client_secret",  "grant_type": "authorization_code",  "default_scopes": "read write",  "token_url": "https://client.int/tokens"}'

Example response(s)

200 OK
Status 200 OK
400 Bad Request
Status 400 Bad Request
{  "errors": [    {      "code": "1301",      "detail": "Invalid request",      "status": "400"    }  ]}
401 Unauthorized
Status 401 Unauthorized
{  "errors": [    {      "code": "1200",      "detail": "Unauthorized",      "status": "401"    }  ]}
403 Forbidden
Status 403 Forbidden
{  "errors": [    {      "code": "1200",      "detail": "Forbidden",      "status": "403"    }  ]}
404 Not Found
Status 404 Not Found
{  "errors": [    {      "code": "1302",      "detail": "Not found",      "status": "404"    }  ]}
422 Unprocessable Entity
Status 422 Unprocessable Entity
{  "errors": [    {      "code": "1303",      "detail": "Invalid value for: Integration. Desc: Integration cannot be nil",      "status": "422"    }  ]}
429 Too Many Requests
Status 429 Too Many Requests
{  "errors": [    {      "code": "1300",      "detail": "Too many requests",      "status": "429"    }  ]}

Delete OAuth Client

  • DELETE /api/services/zis/connections/oauth/clients/{integration}/{client_uuid}

Deletes an OAuth client.

Parameters

Name Type In Required Description
client_uuid string Path true The UUID of the OAuth client
integration string Path true Name of the integration

Using cURL

curl https://{subdomain}.zendesk.com/api/services/zis/connections/oauth/clients/{integration}/{client_uuid} \-H "Authorization: Bearer {access_token}" \-X DELETE

Example response(s)

204 No Content
Status 204 No Content
401 Unauthorized
Status 401 Unauthorized
{  "errors": [    {      "code": "1200",      "detail": "Unauthorized",      "status": "401"    }  ]}
403 Forbidden
Status 403 Forbidden
{  "errors": [    {      "code": "1200",      "detail": "Forbidden",      "status": "403"    }  ]}
404 Not Found
Status 404 Not Found
{  "errors": [    {      "code": "1302",      "detail": "Not found",      "status": "404"    }  ]}
429 Too Many Requests
Status 429 Too Many Requests
{  "errors": [    {      "code": "1300",      "detail": "Too many requests",      "status": "429"    }  ]}