Check status
Poll the status of a login request. We recommend polling every 2 seconds, with a maximum of 30 seconds.
GET/login/status/{id}
URL parameters
| Parameter | Type | Description |
|---|---|---|
id | UUID | The requestId the login request returned Required |
Request
const { Touchque } = require('@touchque/node');
const tq = new Touchque({
apiKey: 'tq_abc123',
apiSecret: 'YOUR_API_SECRET'
});
async function checkStatus(requestId) {
// Check the current status of a request
const response = await tq.login.status(requestId);
console.log('Status:', response.status); // "PENDING", "CONFIRMED", "REJECTED", "EXPIRED"
}
checkStatus('uuid-1234-...');<?php
require_once 'vendor/autoload.php';
use Touchque\Touchque;
use Touchque\Config;
$tq = new Touchque(new Config('tq_abc123', 'YOUR_API_SECRET'));
// Check the current status of a request
$response = $tq->login->status('request_id_here');
echo "Status: " . $response['status']; // "PENDING", "CONFIRMED", "REJECTED", "EXPIRED"package main
import (
"fmt"
"log"
"github.com/Touchque/touchque-go/v5/touchque"
)
func main() {
tq, err := touchque.New(touchque.DefaultConfig("tq_abc123", "YOUR_API_SECRET"))
if err != nil {
log.Fatal(err)
}
// Check the current status of a request
response, err := tq.Login.Status("request_id_here")
if err != nil {
log.Fatal(err)
}
fmt.Println("Status:", response.Status) // "PENDING", "CONFIRMED", "REJECTED", "EXPIRED"
}from touchque import Touchque, Config
tq = Touchque(Config(api_key="tq_abc123", api_secret="YOUR_API_SECRET"))
# Check the current status of a request
response = tq.login.status("request_id_here")
print("Status:", response["status"]) # "PENDING", "CONFIRMED", "REJECTED", "EXPIRED"var tq = new TouchqueClient(new TouchqueOptions { ApiKey = "tq_abc123", ApiSecret = "YOUR_API_SECRET" });
// Check the current status of a request
var response = await tq.Login.StatusAsync("request_id_here");
Console.WriteLine($"Status: {response.Status}"); // "PENDING", "CONFIRMED", "REJECTED", "EXPIRED"var tq = new TouchqueClient(new TouchqueOptions().apiKey("tq_abc123").apiSecret("YOUR_API_SECRET"));
// Check the current status of a request
Login.Status response = tq.login().status("request_id_here");
System.out.println("Status: " + response.status()); // "PENDING", "CONFIRMED", "REJECTED", "EXPIRED"tq = Touchque::Client.new(api_key: "tq_abc123", api_secret: "YOUR_API_SECRET")
# Check the current status of a request
response = tq.login.status("request_id_here")
puts "Status: #{response["status"]}" # "PENDING", "CONFIRMED", "REJECTED", "EXPIRED"# 1) Generate signature
TS=$(date +%s000)
NONCE=$(openssl rand -hex 16)
BODY_HASH=$(echo -n "" | openssl dgst -sha256 | awk '{print $2}')
MSG="GET:/login/status/REQUEST_ID:$TS:$NONCE:$BODY_HASH"
SIG=$(echo -n "$MSG" | openssl dgst -sha256 -hmac "YOUR_API_SECRET" | awk '{print $2}')
# 2) Send request
curl -X GET https://api.touchque.com/login/status/REQUEST_ID \
-H "x-api-key: tq_abc123" \
-H "x-signature: $SIG" \
-H "x-timestamp: $TS" \
-H "x-nonce: $NONCE"Response 200
{
"status": "PENDING"
}
// "PENDING" | "CONFIRMED" | "REJECTED" | "EXPIRED"