Appearance
Authentication
Prerequisites
You'll need your API Key and API Secret, which are provided when you create a Tectly account. Credentials are shared across both the Sandbox and Production environments.
Using the Client SDKs
The easiest way to authenticate is through one of the official client SDKs. Just pass your credentials and the SDK handles the token exchange for you.
ts
import { TectlyClient } from "@tectly/client";
const client = await new TectlyClient().authenticate(
process.env.TECTLY_API_KEY,
process.env.TECTLY_API_SECRET,
);
// The client is now authenticated — start making API calls.
const projects = await client.projectsApi.getProjects({});See the Quickstart for a full working example.
Manual Authentication
If you're not using a client SDK, you can authenticate against the REST API directly. The flow has two steps:
- Exchange your API Key and Secret for a JWT via HTTP Basic Authentication.
- Include the JWT as a Bearer token in all subsequent requests.
Obtaining a Token
Send a POST request to the /issue-authentication-token endpoint with your credentials in the Authorization header, encoded as Basic base64(apiKey:apiSecret).
Request
http
POST /issue-authentication-token HTTP/1.1
Host: sandbox.platform.tectly.com/api/v1
Authorization: Basic base64(YOUR_API_KEY:YOUR_API_SECRET)Response
json
{ "token": "eyJhb…", "expiryDate": "2026-03-23T17:34:22.129Z" }Using the Token
Include the token in the Authorization header of every request:
http
GET /projects HTTP/1.1
Host: sandbox.platform.tectly.com/api/v1
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...When the token expires, call /issue-authentication-token again with your credentials to obtain a new token.