Creating a Custom OAuth Application
CData embeds OAuth application credentials with CData branding that can be used when connecting to Zendesk via a desktop application or a headless machine. However, if you need to connect to Zendesk via the Web, you must create a custom OAuth application. In fact, since custom OAuth applications seamlessly support all three commonly-used auth flows, you might want to create custom OAuth applications (use your own OAuth application credentials) for those auth flows anyway.
Note: Authenticating with OAuth PKCE also requires creating a custom OAuth application.
Custom OAuth applications are useful if you want to:
- control branding of the authentication dialog;
- control the redirect URI that the application redirects the user to after the user authenticates; or
- customize the permissions that you are requesting from the user.
Procedure
The following procedure registers a custom OAuth application and obtains the OAuth client credentials OAuthClientId and OAuthClientSecret.
- Log in using an account that has admin access to your Zendesk account.
- In the Zendesk Support Admin interface, navigate to Admin > Channels > API.
- On the Channels/API page, click the OAuth Clients tab.
- At the right side of the client list, click the plus icon (+).
- To create a client, complete the required fields:
- Set the Redirect URI to http://localhost:33333 or a different port number of your choice. When you connect, you must set the CallbackURL connection property to this exact URL.
- 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 application where you would like the user to be returned after they have authorized your application.
- Click Save. After the page refreshes, a new prepopulated Secret field appears on the lower side.
- Use the unique identifier as the OAuthClientId, and the secret value as the OAuthClientSecret.