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.
https://lens-api.tic.io) and the legacy v1 API (https://api.tic.io). Pick whichever method fits your use case.
Querystring authentication
Appendkey=your_api_key to the URL.
cURL
Request header authentication
Pass the key in thex-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 tologin-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 theuserGuid and the code the user received.
cURL
Response
4. Use the JWT
Send the token as aBearer credential in the Authorization header. Works against both APIs.
cURL