cURL
curl --request POST \ --url https://our-secret-api-url.com/auth/verify \ --header 'Content-Type: application/json' \ --header 'X-API-KEY: <x-api-key>' \ --data ' { "code": "<string>", "userId": 123, "isPhone": true } '
{ "id": "<string>", "expiresAt": "2023-11-07T05:31:56Z", "fresh": true, "userId": 123 }
Verify OTP to complete user login
API key required for authentication
OTP code
User ID
Indicates if the code is for phone verification
OTP code successfully verified and session created
Session ID (token)
Session expiration time
Indicates if the session is fresh