API Key Settings

Once an API Key is created, you can view and manage its settings on the Settings tab of the API Key Detail view.

  1. Access the API Key

    • Click on the API Key in the data grid on Tenant API > API Keys to view its details.

  2. Settings Tab

    • General

      • API Key Name: The name assigned to this API Key. You can update this name as needed.

      • API Key Description: The description provided for this API Key, which can also be updated.

    • Client Details

      • Client ID: Use this in your applications. Click the copy icon to copy the Client ID value to your clipboard.

      • Client Secret: A secure secret used alongside the Client ID. The Client Secret is hidden by default. Click the eye icon to securely retrieve this secret and reveal it in the browser. Click the copy icon to securely retrieve this secret and copy it to your clipboard.

      • Use the Client ID and Client Secret together to retrieve an access token from https://auth.yourTenant.my.contextual.io/oauth/token

      • The body of your POST to the token endpoint should be as follows:

        Request
        {
            "grant_type": "client_credentials",
            "client_id": "yourClientId",
            "client_secret": "yourClientSecret",
            "audience": "https://contextual/no-api"
        }
      • A successful exchange will return the token to use for access to the Tenant API endpoints, as follows:

        Response
        {
            "expires_in": 86400,
            "access_token": "accessToken"
        }
    • Status:

      • API Key Status: Enable or disable the API Key without deleting it. Tenant API Key token access is cached for up to 5 minutes, so when disabled, any tokens issued for the key should no longer be functional within 5 minutes. Re-enabling the API Key will restore functionality to issued tokens immediately.

      • Rotate Client Secret: Rotate the Client Secret for security purposes. Be aware that once confirmed, the old Client Secret will immediately stop working. This action cannot be undone.

      • Delete API Key: Permanently delete the API Key. This action cannot be undone.

Last updated