List API Keys
curl --request GET \
--url https://api.zbdpay.com/api/v1/rewards/app/{rewardsAppId}/api-keys \
--header 'Authorization: <authorization>' \
--header 'z-client: <z-client>'import requests
url = "https://api.zbdpay.com/api/v1/rewards/app/{rewardsAppId}/api-keys"
headers = {
"z-client": "<z-client>",
"Authorization": "<authorization>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'z-client': '<z-client>', Authorization: '<authorization>'}
};
fetch('https://api.zbdpay.com/api/v1/rewards/app/{rewardsAppId}/api-keys', 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.zbdpay.com/api/v1/rewards/app/{rewardsAppId}/api-keys",
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: <authorization>",
"z-client: <z-client>"
],
]);
$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.zbdpay.com/api/v1/rewards/app/{rewardsAppId}/api-keys"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("z-client", "<z-client>")
req.Header.Add("Authorization", "<authorization>")
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.zbdpay.com/api/v1/rewards/app/{rewardsAppId}/api-keys")
.header("z-client", "<z-client>")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zbdpay.com/api/v1/rewards/app/{rewardsAppId}/api-keys")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["z-client"] = '<z-client>'
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Success.",
"data": [
{
"id": "46e64511-4efd-486c-92b7-b5a4f7e5f9d8",
"isActive": true,
"createdAt": "2025-10-30T21:55:34.742Z",
"revokedAt": null
}
]
}
API Keys
List API Keys
Fetch all existing API keys associated with your Rewards App.
GET
/
api
/
v1
/
rewards
/
app
/
{rewardsAppId}
/
api-keys
List API Keys
curl --request GET \
--url https://api.zbdpay.com/api/v1/rewards/app/{rewardsAppId}/api-keys \
--header 'Authorization: <authorization>' \
--header 'z-client: <z-client>'import requests
url = "https://api.zbdpay.com/api/v1/rewards/app/{rewardsAppId}/api-keys"
headers = {
"z-client": "<z-client>",
"Authorization": "<authorization>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'z-client': '<z-client>', Authorization: '<authorization>'}
};
fetch('https://api.zbdpay.com/api/v1/rewards/app/{rewardsAppId}/api-keys', 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.zbdpay.com/api/v1/rewards/app/{rewardsAppId}/api-keys",
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: <authorization>",
"z-client: <z-client>"
],
]);
$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.zbdpay.com/api/v1/rewards/app/{rewardsAppId}/api-keys"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("z-client", "<z-client>")
req.Header.Add("Authorization", "<authorization>")
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.zbdpay.com/api/v1/rewards/app/{rewardsAppId}/api-keys")
.header("z-client", "<z-client>")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zbdpay.com/api/v1/rewards/app/{rewardsAppId}/api-keys")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["z-client"] = '<z-client>'
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Success.",
"data": [
{
"id": "46e64511-4efd-486c-92b7-b5a4f7e5f9d8",
"isActive": true,
"createdAt": "2025-10-30T21:55:34.742Z",
"revokedAt": null
}
]
}
Retrieve all API keys for your Rewards App to see which keys are active and when they were created.
Configuration
Header Parameters
string
required
Client identifier (use
“developer-dashboard” )string
required
Bearer token for authenticationFormat:
Bearer {JWT_TOKEN}Path Parameters
string
required
Your Rewards App ID
{
"success": true,
"message": "Success.",
"data": [
{
"id": "46e64511-4efd-486c-92b7-b5a4f7e5f9d8",
"isActive": true,
"createdAt": "2025-10-30T21:55:34.742Z",
"revokedAt": null
}
]
}
Response Status Codes
| Code | Description |
|---|---|
200 | API keys retrieved successfully |
400 | Bad request - invalid UUID |
401 | Unauthorized - authentication required |
403 | Forbidden - developer does not own this app |
404 | Rewards app not found |
500 | Internal server error |
{
"success": false,
"message": "Invalid UUID"
}
{
"success": false,
"message": "Authentication required"
}
{
"success": false,
"message": "Developer does not own this app"
}
{
"success": false,
"message": "Rewards app not found"
}
{
"success": false,
"message": "Internal server error"
}
Response Fields
| Field | Type | Description |
|---|---|---|
success | boolean | Whether the request was successful |
message | string | Response message |
data | array | Array of API keys |
id | string | Unique identifier for the API key |
isActive | boolean | Whether the API key is currently active |
createdAt | string | ISO 8601 timestamp of when key was created |
revokedAt | string | null | ISO 8601 timestamp of when key was revoked, or null if active |
Code Examples
const rewardsAppId = 'YOUR_REWARDS_APP_ID';
const jwtToken = 'YOUR_JWT_TOKEN';
async function listApiKeys(rewardsAppId) {
const response = await fetch(
`https://api.zbdpay.com/api/v1/rewards/app/${rewardsAppId}/api-keys`,
{
method: 'GET',
headers: {
'z-client': 'developer-dashboard',
'Authorization': `Bearer ${jwtToken}`
}
}
);
const data = await response.json();
if (data.success) {
console.log(`Found ${data.data.length} API keys`);
data.data.forEach(key => {
console.log(`- Key ID: ${key.id}, Active: ${key.isActive}`);
});
return data.data;
} else {
throw new Error(`Failed: ${data.message}`);
}
}
// Get all API keys
const keys = await listApiKeys('b28e0306-2c06-4092-8d56-a1623d6b97fb');
curl --location 'https://api.zbdpay.com/api/v1/rewards/app/b28e0306-2c06-4092-8d56-a1623d6b97fb/api-keys' \
--header 'z-client: developer-dashboard' \
--header 'Authorization: Bearer {JWT_TOKEN}'
import requests
import os
jwt_token = os.getenv('JWT_TOKEN')
rewards_app_id = "YOUR_REWARDS_APP_ID"
def list_api_keys(rewards_app_id):
"""List all API keys for a Rewards App"""
url = f"https://api.zbdpay.com/api/v1/rewards/app/{rewards_app_id}/api-keys"
headers = {
"z-client": "developer-dashboard",
"Authorization": f"Bearer {jwt_token}"
}
response = requests.get(url, headers=headers)
data = response.json()
if data["success"]:
print(f"Found {len(data['data'])} API keys")
for key in data["data"]:
print(f"- Key ID: {key['id']}, Active: {key['isActive']}")
return data["data"]
else:
raise Exception(f"Failed: {data['message']}")
# List keys
keys = list_api_keys("b28e0306-2c06-4092-8d56-a1623d6b97fb")
Empty Response. If
data is an empty array [], it means no API keys exist for this Rewards App.Try It Out
Ready to view your API keys? Use our API playground on the right to test with your JWT token.What’s Next?
After viewing your API keys: Revoke API Key. Remove an API key to prevent it from being used for authenticationWas this page helpful?
⌘I