Authenticate your integration
Use a TestCollab API token for integrations. Requests run with the permissions of the user who owns that token.
Get a token
Section titled “Get a token”Sign in to your TestCollab account, open My Profile Settings, choose the API Token tab, and generate a token. Give each integration a recognizable name when your account offers named tokens.
Use a user who has access to the intended project and the permissions required for the workflow. A valid token does not grant extra project access.
import { createConfiguration, TestCasesApi } from '@testcollab/sdk';
const config = createConfiguration(process.env.TESTCOLLAB_TOKEN!);const api = new TestCasesApi(config);The SDK attaches the API token to requests. You do not need to build an authentication URL for each method.
For a direct HTTP integration, send the token as the token query parameter:
curl --get 'https://api.testcollab.io/testcases' \ --data-urlencode "token=$TESTCOLLAB_TOKEN" \ --data-urlencode 'project=123' \ --data-urlencode '_limit=10'Use HTTPS. Request URLs may contain the token; redact them from logs, error trackers and screenshots.
CLI and MCP
Section titled “CLI and MCP”The CLI reads TESTCOLLAB_TOKEN. The MCP server reads TC_API_TOKEN. Set the correct variable for the client you are using.
See the CLI setup and MCP setup pages for complete examples.
Rotate or revoke a token
Section titled “Rotate or revoke a token”Update the integration’s secret before revoking its old token. Revoking a token prevents future requests made with it; it does not remove data already created by the integration.