Retrieves the entry of verify code
Returns the details of a specific verify code, including its status and history.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”UUID of the verification code request.
Responses
Section titled “ Responses ”Verify code details
Verify code read response. Contains the full verification code request details including current status, delivery history, and cost information.
object
Unique identifier (UUID) of the verification code request.
ID of the user who created the verification code request.
Recipient phone number in international format.
The verification code value. If is_code_deleted was set and the task completed, the code will be absent.
Length of the verification code.
Language used for the message template.
Ordered list of delivery channels that were configured for this request.
object
Delivery channel type.
Timeout in seconds before falling back to the next step. Only applicable for the telegram channel.
Sender identifier used for this channel.
Custom message template used for this channel.
Current status of the verification code: 0 = New, 5 = In Progress, 10 = Success, 20 = Failed, 100 = Error.
The channel that successfully delivered the verification code. Null if not yet delivered or if delivery failed.
Total cost of the verification request in euro cents. Null until processing is complete.
Currency code for the cost.
Custom payload data from the original request.
Unix timestamp of when the verification code was created.
Unix timestamp of the last update.
Processing history for each channel attempt. One entry per routing step.
object
History entry UUID.
Channel type for this attempt.
Status of this channel attempt: 0 = New, 5 = In Progress, 10 = Success, 20 = Failed, 100 = Error.
Unix timestamp of when this step was processed.
External provider message ID.
Whether the verification code has been deleted from storage after being sent to the recipient.
Examples
Verify code response with multi-channel routing
Successful response after creating a verification code with a 3-step routing strategy. Telegram and voice channels failed, SMS succeeded.
{ "id": "d7ad7539-fb8f-4dbb-a7f7-7c40babec969", "user_id": 12345, "phone": "+491701234567", "routing_strategy": [ { "channel": "telegram", "timeout_sec": 30 }, { "channel": "voice", "sender_id": "LOX24", "template": "Your code is {{code}}" }, { "channel": "sms", "sender_id": "LOX24", "template": "Your code is {{code}}" } ], "status": 10, "delivered_channel": "sms", "cost": 120, "currency": "EUR", "code": "1234", "code_length": 4, "payload": "yours payload here", "lang": "EN", "created_at": 1779903448, "updated_at": 1779903510, "history": [ { "id": "bccaff09-59f2-11f1-a685-7c10c91d54a1", "channel": "telegram", "status": 20, "processed_at": 1779903478, "external_id": "tg_msg_001" }, { "id": "bccaff09-59f2-11f1-a685-7c10c91d54a2", "channel": "voice", "status": 20, "processed_at": 1779903490, "external_id": "voice_msg_002" }, { "id": "bccaff09-59f2-11f1-a685-7c10c91d54a3", "channel": "sms", "status": 10, "processed_at": 1779903510, "external_id": "sms_msg_003" } ], "is_code_deleted": false}Client ID or API key isn’t active or invalid!
Account isn’t activated. Please wait or contact to support!
Resource not found
IP address was temporary blocked, because during short time from it was sent many request with invalid credentials. Please wait and try later.
Code Samples
#!/usr/bin/env bashcurl -X GET https://api.lox24.eu/verify_codes/d7ad7539-fb8f-4dbb-a7f7-7c40babec969 \ -H 'X-LOX24-AUTH-TOKEN: 1234567:e3f3a759b6677959b6ebfcxxxxxxxxxx'using System;using System.IO;using System.Net;using System.Text;
namespace Lox24.Api{ class GetVerifyCodesItem { static void Main() { string key = "1234567:e3f3a759b6677959b6ebfcxxxxxxxxxx"; string verifyCodeId = "d7ad7539-fb8f-4dbb-a7f7-7c40babec969"; string url = $"https://api.lox24.eu/verify_codes/{verifyCodeId}";
var httpWebRequest = (HttpWebRequest)WebRequest.Create(url); httpWebRequest.ReadWriteTimeout = 100000; httpWebRequest.ContentType = "application/json; charset=utf-8"; httpWebRequest.Accept = "application/json"; httpWebRequest.Method = "GET"; httpWebRequest.Headers.Add("X-LOX24-AUTH-TOKEN", key);
try { using (HttpWebResponse resp = (HttpWebResponse)httpWebRequest.GetResponse()) { if (resp.StatusCode == HttpStatusCode.OK) { Console.WriteLine("Success:{0} {1}", (int)resp.StatusCode, "verify code resource response"); } else { Console.WriteLine("Error: wrong response code {0}", (int)resp.StatusCode); }
Stream respStream = resp.GetResponseStream(); using (StreamReader sr = new StreamReader(respStream, Encoding.UTF8)) { string responseText = sr.ReadToEnd(); Console.WriteLine("responseText : {0}", responseText); } } } catch (System.Net.WebException ex) { var webResponse = ex.Response as System.Net.HttpWebResponse; Console.WriteLine("Error:{0}", webResponse.StatusCode);
switch (webResponse.StatusCode) { case HttpStatusCode.Unauthorized: Console.WriteLine("Error:401 Client ID or API key isn't active or invalid!"); break; case HttpStatusCode.Forbidden: Console.WriteLine("Error:403 Account isn't activated."); break; case HttpStatusCode.NotFound: Console.WriteLine("Error:404 Resource not found"); break; case HttpStatusCode.InternalServerError: case HttpStatusCode.BadGateway: case HttpStatusCode.ServiceUnavailable: case HttpStatusCode.GatewayTimeout: Console.WriteLine("System error! Please contact to LOX24 support!"); break; } } } }}package main
import ( "fmt" "io" "log" "net/http")
func main() {
const Method = "GET" const URL = "https://api.lox24.eu/verify_codes/d7ad7539-fb8f-4dbb-a7f7-7c40babec969" const Token = "1234567:e3f3a759b6677959b6ebfcxxxxxxxxxx"
client := &http.Client{}
req, err := http.NewRequest(Method, URL, nil) if err != nil { log.Fatal(err) }
req.Header.Add("X-LOX24-AUTH-TOKEN", Token) req.Header.Add("Accept", "application/json")
res, err := client.Do(req) if err != nil { log.Fatal(err) }
defer res.Body.Close()
body, err := io.ReadAll(res.Body) if err != nil { log.Fatal(err) }
switch res.StatusCode { case 200: fmt.Println(string(body)) case 401: fmt.Println("Error: code = 401 - Client ID or API key isn't active or invalid!") case 403: fmt.Println("Error: code = 403 - Account isn't activated.") case 404: fmt.Println("Error: code = 404 - Resource not found") default: fmt.Printf("Error: code = %d\n", res.StatusCode) }}package eu.lox24.doc.verify_codes;
import java.io.IOException;import java.net.HttpURLConnection;import java.net.URI;import java.net.http.HttpClient;import java.net.http.HttpRequest;import java.net.http.HttpResponse;import java.time.Duration;
public class GetVerifyCodesItem {
public static void main(String[] args) {
var key = "1234567:e3f3a759b6677959b6ebfcxxxxxxxxxx"; var verifyCodeId = "d7ad7539-fb8f-4dbb-a7f7-7c40babec969"; var url = "https://api.lox24.eu/verify_codes/" + verifyCodeId;
var httpRequest = HttpRequest.newBuilder(URI.create(url)) .timeout(Duration.ofMillis(100000)) .setHeader("Accept", "application/json") .setHeader("X-LOX24-AUTH-TOKEN", key) .GET() .build();
var client = HttpClient.newBuilder() .version(HttpClient.Version.HTTP_1_1) .build();
try { var httpResponse = client.send(httpRequest, HttpResponse.BodyHandlers.ofString());
if (httpResponse.statusCode() == HttpURLConnection.HTTP_OK) { System.out.println("Success:" + httpResponse.statusCode() + " " + "verify code resource response"); System.out.println("Response text : \n" + httpResponse.body()); } else { switch (httpResponse.statusCode()) { case HttpURLConnection.HTTP_UNAUTHORIZED: System.out.println("Error:401 Client ID or API key isn't active or invalid!"); break; case HttpURLConnection.HTTP_FORBIDDEN: System.out.println("Error:403 Account isn't activated."); break; case HttpURLConnection.HTTP_NOT_FOUND: System.out.println("Error:404 Resource not found"); break; case HttpURLConnection.HTTP_INTERNAL_ERROR: case HttpURLConnection.HTTP_BAD_GATEWAY: case HttpURLConnection.HTTP_UNAVAILABLE: case HttpURLConnection.HTTP_GATEWAY_TIMEOUT: System.out.println("System error! Please contact to LOX24 support!"); break; default: System.out.println("Error: wrong response code " + httpResponse.statusCode()); } } } catch (IOException | InterruptedException e) { e.printStackTrace(); } }}/* * Get verify code by ID */const token = "1234567:e3f3a759b6677959b6ebfcxxxxxxxxxx";const verifyCodeId = "d7ad7539-fb8f-4dbb-a7f7-7c40babec969";
const https = require('https');const options = { hostname: 'api.lox24.eu', path: `/verify_codes/${verifyCodeId}`, method: 'GET', headers: { 'Accept': 'application/json', 'X-LOX24-AUTH-TOKEN': token }}
const req = https.request(options, res => { if (res.statusCode == 200) { console.log("Success: code = 200 - verify code resource response"); res.on('data', d => { process.stdout.write(d) }) } else if (res.statusCode == 401) console.log("Error: code = 401 - Client ID or API key isn't active or invalid!"); else if (res.statusCode == 403) console.log("Error: code = 403 - Account isn't activated."); else if (res.statusCode == 404) console.log("Error: code = 404 - Resource not found");})
req.on('error', error => { console.error(error)})req.end();<?php
$verifyCodeId = 'd7ad7539-fb8f-4dbb-a7f7-7c40babec969';$uri = "https://api.lox24.eu/verify_codes/{$verifyCodeId}";
$token = '1234567:e3f3a759b6677959b6ebfcxxxxxxxxxx';
$curl = curl_init();
curl_setopt_array($curl, [ CURLOPT_URL => $uri, CURLOPT_HTTPHEADER => [ "X-LOX24-AUTH-TOKEN: {$token}", 'Accept: application/json', ], CURLOPT_RETURNTRANSFER => true, CURLOPT_TIMEOUT => 20, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,]);
$response = curl_exec($curl);$code = curl_getinfo($curl, CURLINFO_HTTP_CODE);curl_close($curl);
$data = json_decode($response, JSON_OBJECT_AS_ARRAY);
if(200 === $code) { echo 'Success: response data = ' . var_export($data, true);} else { echo "Error: code = {$code}, data = " . var_export($data, true);}import jsonimport requests
token = "1234567:e3f3a759b6677959b6ebfcxxxxxxxxxx"verify_code_id = "d7ad7539-fb8f-4dbb-a7f7-7c40babec969"
url = f'https://api.lox24.eu/verify_codes/{verify_code_id}'
headers = { 'Accept': 'application/json', 'X-LOX24-AUTH-TOKEN': token,}
try: res = requests.get(url, headers=headers, timeout=100) if res.status_code != 200: res.raise_for_status() else: print(f'Success: code = {res.status_code} - verify code resource response') print("Response: ", json.dumps(res.json(), indent=4))
except requests.HTTPError: if res.status_code == 401: print("Error: code = 401 - Client ID or API key isn't active or invalid!") elif res.status_code == 403: print("Error: code = 403 - Account isn't activated.") elif res.status_code == 404: print("Error:404 Resource not found") elif res.status_code in (500, 502, 503, 504): print("System error! Please contact to LOX24 support!") else: print(f"Error: code {res.status_code}") print(json.dumps(res.json(), indent=4))