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.
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, 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 creator of the key must have the role of Owner 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.
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.