Inspect the current API key
curl --request GET \
--url https://api.yuvexpay.com/v1/auth/self \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.yuvexpay.com/v1/auth/self"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.yuvexpay.com/v1/auth/self', 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://api.yuvexpay.com/v1/auth/self",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.yuvexpay.com/v1/auth/self"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.yuvexpay.com/v1/auth/self")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.yuvexpay.com/v1/auth/self")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"apiKey": {
"id": "5d0f8b6e-3a02-4f5b-9e1c-7c6a4a1b8c9d",
"name": "Backend integration",
"description": null,
"environment": "PRODUCTION",
"prefix": "ypk_live_ab12cd34ef",
"scopes": [
"payments:write",
"payments:read",
"withdrawals:write",
"withdrawals:read"
],
"ipAllowlist": [
"203.0.113.10"
],
"rateLimitPerMinute": 600,
"expiresAt": null,
"lastUsedAt": "2026-05-03T14:21:08.443Z",
"createdAt": "2026-04-12T09:00:00.000Z"
}
}{
"error": {
"code": "INVALID_API_KEY",
"message": "Invalid or revoked API key"
}
}Authentication
Inspect the current API key
Return metadata about the API key currently being used: id, name, environment, scopes, IP allowlist, last-used timestamp and expiration. Useful for verifying key configuration without storing it client-side.
GET
/
v1
/
auth
/
self
Inspect the current API key
curl --request GET \
--url https://api.yuvexpay.com/v1/auth/self \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.yuvexpay.com/v1/auth/self"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.yuvexpay.com/v1/auth/self', 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://api.yuvexpay.com/v1/auth/self",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.yuvexpay.com/v1/auth/self"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.yuvexpay.com/v1/auth/self")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.yuvexpay.com/v1/auth/self")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"apiKey": {
"id": "5d0f8b6e-3a02-4f5b-9e1c-7c6a4a1b8c9d",
"name": "Backend integration",
"description": null,
"environment": "PRODUCTION",
"prefix": "ypk_live_ab12cd34ef",
"scopes": [
"payments:write",
"payments:read",
"withdrawals:write",
"withdrawals:read"
],
"ipAllowlist": [
"203.0.113.10"
],
"rateLimitPerMinute": 600,
"expiresAt": null,
"lastUsedAt": "2026-05-03T14:21:08.443Z",
"createdAt": "2026-04-12T09:00:00.000Z"
}
}{
"error": {
"code": "INVALID_API_KEY",
"message": "Invalid or revoked API key"
}
}Authorizations
YuvexPay API key. Include as Authorization: Bearer ypk_<env>_<kid>_<secret> where <env> is test (sandbox) or live (production). Create and manage keys in the dashboard under Settings > API Keys.
Response
API key metadata.
Show child attributes
Show child attributes
⌘I

