Skip to main content

Create a Torq API key: Enable programmatic access

Follow this guide to create your own Torq API key for authentication.

Updated over a week ago

To incorporate Torq vendor Steps in your Workflows or use the Torq API, you must first create a Torq integration instance or generate a bearer token. This process requires API key credentials: a client ID and a client secret. This guide will walk you through creating a Torq API key.

Generate API keys

Create private API keys

An API key includes a client ID and a client secret, which are used to authenticate requests. API keys are specific to each workspace, meaning you must use the API key created within the same workspace where you intend to run your requests. Use the correct API key for the corresponding workspace to ensure successful authentication.

To create a private API key:

  1. Navigate to API Keys: At the bottom of the navigation bar, click your user icon or avatar, then select API Keys.

  2. Create a key: Click Create API Key.

    1. Enter a meaningful key name.

    2. Select a predefined expiration date, or choose a specific date by clicking Select from calendar.

    3. Click Create to generate the new private API key.

  3. Save the credentials: Copy and securely store the client ID and secret—the secret will not be displayed again.

  4. (Optional) Use the key: To use the service API key within a workspace, create a Torq Steps integration.

Create service API keys

Service API keys allow you to perform the same operations as a user with a similar role who has a private API key. However, they are more secure and efficient as they are not associated with any users.

Like private API keys, they can be created in a Workflow via the Create a Service API Key Step. They also have similar sharing capabilities—contact your customer support representative to enable sharing a service API key without requiring manual confirmation from the receiving workspace.

The key's creator must have the Owner role within the workspace.

To create a service API key:

  1. Navigate to API Keys: At the bottom of the navigation bar, click your user icon or avatar, then select API Keys.

  2. Create a key: Click Create API Key.

    1. Enter a meaningful key name.

    2. Select a predefined expiration date, or choose a specific date by clicking Select from calendar.

    3. Toggle the API key Type to Service.

    4. Select the role you want the API key to have. This determines the key's access level.

    5. Click Create to generate the new service key.

  3. Save the credentials: Copy and securely store the client ID and secret—the secret will not be displayed again.

  4. (Optional) Use the key: To use the service API key within a workspace, create a Torq Steps integration.

Edit API keys

An API key's name and type cannot be changed once the key has been created. Only its expiration date can be modified.

New API keys require an expiration date at the time of creation. If any keys were previously generated without one, they will remain valid and their expiration date will be listed as Never. The expiration date for these keys can later be configured from the API Keys page or the Set API Key Expiration Workflow Step.

To manually change an API key's expiration date:

  1. Navigate to API Keys: At the bottom of the navigation bar, click your user icon or avatar, then select API Keys.

  2. Edit the key: Select the relevant API key and click Edit in the side menu.

  3. Select a new date: Select a predefined expiration date, or choose a specific date by clicking Select from calendar, and click Save.

Expired API keys are not automatically deleted. They are marked as Expired on the API Keys page and must be replaced as they are no longer valid.

Replace Torq integration API keys

To replace an existing API key used as a Torq integration instance:

  1. Create a new key: Generate the new private or service key as detailed above, and save the credentials in a safe location.

    1. If replacing a private key with a service API key, assign the new key to a role matching the existing key's permissions.

  2. Navigate to the integration: Go to Build > Integrations > Steps > Torq, choose the integration instance you want to replace, and click Edit in the side menu.

  3. Edit the integration: Paste the new client ID and client secret you generated, and click Save.

Moving forward, any Workflows and Steps that use this integration will use the new service or private API key.

Although the API key can be replaced, the integration instance's name cannot be modified after creation.

Use API keys in Torq

  • Create Torq integration instances: Create a Torq integration to authenticate Steps.

    1. Go to Build > Integrations > Steps > Torq and click Add Instance.

    2. Give the integration instance a meaningful and unique name (it is recommended to include the name of the person whose account was used to create the key).

    3. Paste the client ID and client secret saved earlier.

    4. Click Add.

  • Create bearer tokens: Torq API utilizes bearer tokens for secure request authentication.

Bearer tokens are valid for one hour (3,600 seconds).

Did this answer your question?