Validate User API Token
curl --request POST \
--url https://leuwongrr.online/api/v1/auth/token/validate \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://leuwongrr.online/api/v1/auth/token/validate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://leuwongrr.online/api/v1/auth/token/validate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"success": true,
"message": "OK",
"data": {
"valid": true,
"connected": true,
"base_url": "https://leuwongrr.online/api/v1",
"token": {
"name": "User API Token",
"prefix": "lrrs_v1_",
"environment": "sandbox",
"last_used_at": "2026-05-01 09:00:00"
},
"user": {
"id": 1,
"name": "LeuwongRR User",
"email": "us***@example.com",
"status": "active",
"balance": 25000,
"currency": "IDR"
},
"next_steps": [
"GET /api/v1/me",
"GET /api/v1/me/balance",
"POST /api/v1/me/orders",
"GET /api/v1/me/invoices/{invoice}/status"
]
}
}{
"success": false,
"message": "Unauthorized user API token."
}{
"success": false,
"message": "Akun pemilik token tidak aktif atau belum memenuhi syarat API."
}{
"success": false,
"message": "Terlalu banyak request. Silakan coba lagi beberapa saat."
}Endpoint Publik Aman
Validate User API Token
Memvalidasi User API Token dan mengembalikan informasi ringkas token serta akun pemilik token. Token dapat dikirim lewat header Authorization: Bearer USER_API_TOKEN.
POST
https://leuwongrr.online
/
api
/
v1
/
auth
/
token
/
validate
Validate User API Token
curl --request POST \
--url https://leuwongrr.online/api/v1/auth/token/validate \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://leuwongrr.online/api/v1/auth/token/validate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://leuwongrr.online/api/v1/auth/token/validate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"success": true,
"message": "OK",
"data": {
"valid": true,
"connected": true,
"base_url": "https://leuwongrr.online/api/v1",
"token": {
"name": "User API Token",
"prefix": "lrrs_v1_",
"environment": "sandbox",
"last_used_at": "2026-05-01 09:00:00"
},
"user": {
"id": 1,
"name": "LeuwongRR User",
"email": "us***@example.com",
"status": "active",
"balance": 25000,
"currency": "IDR"
},
"next_steps": [
"GET /api/v1/me",
"GET /api/v1/me/balance",
"POST /api/v1/me/orders",
"GET /api/v1/me/invoices/{invoice}/status"
]
}
}{
"success": false,
"message": "Unauthorized user API token."
}{
"success": false,
"message": "Akun pemilik token tidak aktif atau belum memenuhi syarat API."
}{
"success": false,
"message": "Terlalu banyak request. Silakan coba lagi beberapa saat."
}Authorizations
Masukkan User API Token dari halaman https://leuwongrr.online/user/api-access. Gunakan tanpa prefix Bearer jika field playground sudah otomatis menambahkan Bearer.
Was this page helpful?