Generate API Tokens and Create Webhooks

REQUIRED USER ROLE 
API User
PERMISSION OVERVIEW
View permissions by role

API tokens are required to use Gladly APIs for security and authentication purposes. Tokens can be accessed and created by users who at least have an API user role.

Before you start

  • For integrations not built by Gladly, a Gladly Administrator should create a new user with an API role + Agent and/or Administrator (check with your integration partner to confirm the required roles) account for each integration. This account should be used to access Gladly to create the API tokens or webhooks.

    • The integration partner should provide the email address to be used with the integration's user account in Gladly. They must also access emails from this account to activate their Gladly account to create API tokens or webhooks.

  • API tokens are tied to a single user account and a particular environment. For example, an API token attached to Gladly user [email protected] in the Sandbox environment is not valid for [email protected] in the Production environment.

    • We recommend creating a dedicated Gladly user to make API calls whose account won't be used for Agent and organization management. This will help you with any future audits of API activity vs. Agent activity.

Create a unique user account linked to webhooks or tokens

  1. As an Administrator, create a user to use explicitly to create and attach webhooks or tokens.

    • Be sure to add the user with at least an API User role + Agent and/or Administrator. If this user needs access to reports, they'll need Administrator access. For a complete list of user permissions, click here.

    • Note – We recommend creating a dedicated user to make API calls.

      • Use the email address provided by the integration partner if you're given one.

    • Use a name to help you quickly identify the integration user. For example, "Retale Integration."

  2. An email will be sent to the user. Someone must complete the registration and sign in to Gladly to create API tokens or webhooks. They'll have 24 hours to accept the user invitation before it expires.

Deactivating an API User

If a user account with API tokens or webhooks attached to it is deactivated, apps or external sources using the token or webhook linked to the user will stop working.

Create API tokens

  1. Click on the top left corner of the screen.

  2. Click Settings.

  3. Under the App Developer Tools category, click API tokens. The API tokens page will show you a list of currently available API tokens.

  4. Click Create Token.

  5. A new token is immediately generated within the page.
    Table displaying token details including name, token value, and creation date.

  • Copy and secure the token under the Token column. The token is only shown once, so save it in a secure location.

  • Click the token name (e.g., Token 1) to rename the token to make it easy to identify how the token is used.

  • To delete a token, hover over the token and click .

Create new webhooks

Create up to 50 webhooks for your organization. See our developer guide for more information about webhooks.

  1. Click on the top left corner of the screen.

  2. Click Settings.

  3. Under the App Developer Tools category, click Webhooks. The Webhooks page will show you a list of webhooks you currently have configured.

  4. Click Create Webhook.

  5. From the Create Webhook page, enter the following information:

    • Name – Enter a name to help you identify the app using a webhook.

    • Enabled (toggle) – Allows you to activate/deactivate the webhook. Click the toggle so it's green to activate the webhook.

    • Webhook URL – Enter the URL where you'd like to send events.

      • If you get an "unable to ping URL" error, double-check the URL and make sure it's correct.

    • Events – Select the events you'd like to use from the search picklist. The Webhook Events you select are added below the search bar. For more information about Webhook Events, please visit our developer guide.

    • Username (Optional) – Enter the username for the app you are integrating.

    • Password (Optional) – Enter the password for the app you are integrating.

    • Realm (Optional) – Enter realm to run basic auth against.

    • HTTP Headers (Optional) – There are two columns (Header, Value) required for HTTP Headers (e.g., X-API-Key) to be included in every request.

      • Click Add a Header to add a new line.

      • Click to delete a line.

  6. Click Save. This will take you back to the Webhooks page, where the webhook you just added is visible.

Webhook 3 toggle switch is enabled, indicating successful configuration completion.

Activate/Deactivate a webhook

In the Status column, click the toggle next to the webhook you want to activate/deactivate. The toggle turns gray when it's deactivated and green when activated.

Reactivate a webhook

Gladly automatically deactivates webhooks that fail. To see when a webhook was deactivated, hover over the exclamation point. Once the issue causing the webhook to fail is resolved, reactivate it. If the webhook is not being used, keep it deactivated or delete it if it is no longer used.

Notification indicating webhook deactivation date and toggle switch for test2 setting.

Delete a webhook

To delete a webhook, hover over the webhook and click .

Replace or rotate API tokens

Should you lose this token or wish to rotate your application keys, you can do the following:

  1. Generate a new token.

  2. Store the new token in a secure location.

  3. Delete the old token.

  4. Update your applications/scripts with the new token.