# Zendesk

To connect, set the URL and provide authentication. The URL is your Zendesk Support URL: https\://{subdomain}.zendesk.com.

### Authenticating to Zendesk

&#x20;Zendesk uses Basic authentication or the OAuth 2 authentication standard.

Use Basic to connect to your own data. Use OAuth to allow other users to connect to their data.

### Using Basic Authentication <a href="#using-basic-authentication" id="using-basic-authentication"></a>

&#x20;To use Basic authentication, specify your email address and password or your email address and an API token. Set User to your email address and follow the steps below to provide the Password or ApiToken.

1. &#x20;Enable password access in the Zendesk Support admin interface at Admin > Channels > API.
2. &#x20;Manage API tokens in the Zendesk Support Admin interface at Admin > Channels > API. More than one token can be active at the same time. Deleting a token deactivates it permanently.

### Using OAuth Authentication <a href="#using-oauth-authentication" id="using-oauth-authentication"></a>

&#x20;OAuth requires the authenticating user to interact with Zendesk using the browser. The provider facilitates this in various ways as described below.

#### Register an OAuth Application <a href="#register-an-oauth-application" id="register-an-oauth-application"></a>

Follow the procedure below to register a third-party application and obtain the OAuth client credentials, the OAuthClientId and OAuthClientSecret. Note that this procedure requires admin access to your Zendesk account.

1. In the Zendesk Support Admin interface, go to Admin > Channels > API.
2. Click the OAuth Clients tab on the Channels/API page and then click the plus icon (+) on the right side of the client list.
3. Complete the required fields to create a client.

   If you are making a desktop application, set the Redirect URI to <http://localhost:33333> or a different port number of your choice.

   If you are making a Web application, set the Redirect URI to a page on your Web app you would like the user to be returned to after they have authorized your application.
4. Click Save. After the page refreshes, a new prepopulated Secret field appears on the lower side.
5. Use the unique identifier as the OAuthClientId and the secret value as the OAuthClientSecret.

After setting the following connection properties, you are ready to connect:

* OAuthClientId: Set this to the client Id that you specified in your app settings.
* OAuthClientSecret: Set this to the client secret that you specified in your app settings.
* CallbackURL: Set this to the Redirect URI you specified in your app settings.
* InitiateOAuth: Set this to GETANDREFRESH. You can use InitiateOAuth to manage the process to obtain the OAuthAccessToken.

&#x20;When you connect, the provider opens the OAuth endpoint in your default browser. Log in and grant permissions to the application. The provider then completes the OAuth process.

1. Extracts the access token from the callback URL and authenticates requests.
2. Obtains a new access token when the old one expires.
3. Saves OAuth values in OAuthSettingsLocation to be persisted across connections.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.appstrategy.com/apprules-r-documentation/platform/platform-features/system-settings/data-sources/connection-settings/customerservice/zendesk.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
