To incorporate Torq vendor steps in your workflows or use the Torq API, you must first create a Torq integration 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.
Using API Keys in Torq
Torq Integration: Create a Torq integration to authenticate steps.
To create a Torq integration within your workspace, go to Build > Integrations > Steps > Torq and click Add.
Give the integration a unique name (it is recommended to include the name of the person whose account was used to create the key)
Paste the Client ID and Client Secret saved earlier.
Click Add.
Bearer Token Authentication: Torq API utilizes bearer tokens for secure request authentication.
Bearer tokens are valid for one hour (3,600 seconds).
Creating an API Key
An API key includes a client ID and a client secret, which is 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.
Navigate to API Keys: Click on your workspace icon or avatar, then select API Keys > Create API Key.
API Key Generation: Assign your new API key a descriptive name and click Create to generate your credentials.
Secure Your Credentials: Copy and securely store the Client ID and Client Secret immediately. The Client Secret cannot be retrieved once you navigate away from the creation screen.
Creating a Service API Key
Service API keys allow the creation of an API key that can perform all the same operations as a user with a similar role's private API key. However, they are more secure and efficient as they are not associated with users.
Please note:
The key's creator must have the Owner role within the workspace.
Service API keys, like private API keys, can be created in a workflow step within Torq.
Sharing capabilities are similar to those of a private API key.
Please contact your customer support representative to enable sharing a service API key without requiring manual confirmation from the receiving workspace.
Creating a service API key is very similar to creating a private API key.
Navigate to API Keys: Click on your workspace icon or avatar, then select API Keys > Create API Key.
Select Service: Toggle the API Key Type to Service.
Adjust Permissions: Select the role you want the API key to have. This determines the key's access level.
Generate API Key: Give the API key a unique and meaningful name (this cannot be changed later), and then click Create to generate the new service key.
Securely Save: Copy and securely store the Client ID and Secret - the secret will not be presented to you again.
To use the Service API key within a workspace, create a Torq Steps integration.
Replace a Torq Integration API Key
If at any point you would like to replace an existing API key being used as a Torq integration, follow these steps:
Generate the new key (either personal or service) as detailed above, saving the credentials in a temporary and safe location.
If replacing a personal key with a service API key, assign the new key to a role matching the existing key's permissions.
In Torq, go to Build > Integrations > Steps > Torq.
Choose the integration you want to replace and click Edit in the side menu.
Paste the new Client ID and Client Secret generated in step 1, and click Save.
From now on, any workflows and steps that use this integration will use the new API key (service or personal).
Note that you cannot edit the integration's name.