Skip to main content

Credential Management

This guide provides an overview of how to manage your Bandwidth API credentials, including creating, using, rotating, updating, and revoking them.

Creating API Credentials

You can create API credentials via the Bandwidth App or the API.

  1. Log in to the Bandwidth App.
  2. Navigate to Account > API Credentials.
  3. Click on the Create button.
  4. Fill in all required fields:
    • Description: A brief note to help you identify these credentials.
    • Account scope: Choose whether the credentials will have basic or admin level access.
    • Expiration: Optionally set an expiration date for the initial client secret.
    • Roles: Select the roles that define the permissions for these credentials.
    • Accounts: Select the accounts that these credentials will have access to.
  5. Click Create to generate your new API Credential.
warning

Client Secret Notice: Make sure to securely store the Client Secret, as it will only be shown once.

Using API Credentials

warning

Security Notice: Always retrieve tokens from a server running in a secure environment and provide them securely to clients. Client-side JavaScript does not have a mechanism for hiding credentials, so DO NOT place credentials directly in your client-side code.

Bandwidth accepts no responsibility for lost account credentials or any resulting network traffic, fraud, or unauthorized account access resulting from failing to manage account credentials securely.

Using Bandwidth SDKs

Newer versions of the Bandwidth SDKs handle the OAuth 2.0 Client Credentials flow for you. When initializing the SDK, provide your Client ID and Client Secret, and the SDK will manage token retrieval and refreshing automatically.

Upgrade to the latest version of the Bandwidth SDK for your programming language and refer to the SDK documentation for specific instructions on how to use API Credentials.

Rotating Your Client Secret

To enhance security, we recommend rotating your client secret periodically. You can do this via the Bandwidth App or the API. We support up to two active client secrets per API credential to facilitate smooth rotation.

warning

Client Secret Notice: Make sure to securely store any newly created Client Secrets, as they will only be shown once.

  1. Log in to the Bandwidth App.
  2. Navigate to Account > API Credentials.
  3. Select the API credential for which you want to rotate the client secret.
  4. In the secrets section, click on Create New Secret.
  5. Enter the expiration date for the new secret, if desired.
  6. Click Create to generate the new client secret.
  7. Update your applications to use the new client secret for authentication.
  8. Optionally, you can revoke the old client secret once you've confirmed that your applications are functioning correctly with the new secret.

Updating API Credentials

You can update certain properties of your API credentials via the Bandwidth App or the API.

  1. Log in to the Bandwidth App.
  2. Navigate to Account > API Credentials.
  3. Select the API credential you wish to update.
  4. Modify the desired fields, such as:
  • Description: A brief note to help you identify these credentials.
  • Account scope: Choose whether the credentials will have basic or admin level access.
  • Roles: Select the roles that define the permissions for these credentials.
  • Accounts: Select the accounts that these credentials will have access to.
  • Status: Activate or deactivate the credential.

Revoking API Credentials

You can revoke your API credentials via the Bandwidth App or the API. We support deactivating credentials to temporarily disable them without permanent deletion. We recommend deactivating credentials first to ensure that no active applications are using them before proceeding with permanent deletion.

Deactivating Credentials

  1. Log in to the Bandwidth App.
  2. Navigate to Account > API Credentials.
  3. Select the API credential you wish to deactivate.
  4. Click on the Edit button in the Credential details section.
  5. Change the Status to Inactive.
  6. Click Save to apply the changes.

Deleting Credentials

warning

Permanent Deletion Notice: Deleting API credentials is a permanent action and cannot be undone. Ensure that the credentials are no longer in use before proceeding with deletion.

  1. Log in to the Bandwidth App.
  2. Navigate to Account > API Credentials.
  3. Select the API credential you wish to delete.
  4. Click on the Delete button.
  5. Confirm the deletion when prompted.