Skip to main content
This page covers the authentication flows shared by both APIs. For LENS (v2) specifics — detailed error codes, feature gating, and brute-force protection — see Authentication in the v2 API.
TIC uses a single authentication model for both the LENS API (v2) (https://lens-api.tic.io) and the legacy v1 API (https://api.tic.io). Pick whichever method fits your use case.

Querystring authentication

Append key=your_api_key to the URL.
The key is visible in browser history, server logs, and proxy logs. Only use this for throwaway experiments.
cURL

Request header authentication

Pass the key in the x-api-key header. This is the recommended method.
cURL

Login user and retrieve JWT token

Use this when your application calls the API on behalf of an end user and needs a user-scoped token. This flow is only available to approved applications.

1. Request a one-time password

POST to login-otp with the user’s mobile phone (E.164) or email address.
cURL
Response

2. User receives the OTP

The code is sent to the user’s phone or email and is valid for a short window.

3. Validate the OTP

POST the userGuid and the code the user received.
cURL
Response

4. Use the JWT

Send the token as a Bearer credential in the Authorization header. Works against both APIs.
cURL