Skip to content
Create an account

OTP: status

OTP: status #

GET /v1/otps/{id}
GET /otps/{{otp_id}}

Get the current status of an OTP.

Example request

// Consulter le statut d'un code OTP
const credentials = btoa('ACCESS_KEY:ACCESS_SECRET');
const res = await fetch('https://api.callistosignal.com/v1/otps/550e8400-e29b-41d4-a716-446655440000', {
    headers: { 'Authorization': 'Basic ' + credentials }
});
// Consulter le statut d'un code OTP
$ch = curl_init('https://api.callistosignal.com/v1/otps/550e8400-e29b-41d4-a716-446655440000');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_USERPWD        => 'ACCESS_KEY:ACCESS_SECRET',
]);
$response = curl_exec($ch);
curl -u 'ACCESS_KEY:ACCESS_SECRET' \
  https://api.callistosignal.com/v1/otps/550e8400-e29b-41d4-a716-446655440000

Response

{
  "otp_id": "550e8400-e29b-41d4-a716-446655440000",
  "status": "pending",
  "recipient": "+22507XXXXXXXX",
  "expires_at": "2026-04-07T10:35:00Z",
  "verified_at": null,
  "attempts": 0,
  "created_at": "2026-04-07T10:30:00Z"
}

Possible statuses

Status Description
pending Not verified yet
verified The code was verified
expired The code has expired
failed Three wrong codes entered, the OTP is locked

An unknown OTP returns 404.