English
English
Appearance
English
English
Appearance
All API requests to badges.ninja require authentication. This page explains how to authenticate your requests.
https://api.badges.ninjaAll API endpoints are relative to this base URL.
The primary authentication method is an API key passed in the X-Api-Key header.
From the dashboard:
From the API:
API keys can also be managed via the API using your JWT token from the Cognito authentication flow. See the dashboard for the simplest approach.
Include the X-Api-Key header in every request:
curl -X GET https://api.badges.ninja/issuers \
-H "X-Api-Key: bws_your_api_key_here"Keys use the bws_ prefix:
bws_a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6parameters objectContent-Type: application/json{
"parameters": {
"name": "My Badge",
"description": "A sample badge"
}
}curl -X POST https://api.badges.ninja/issuers \
-H "X-Api-Key: bws_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"parameters": {
"name": "My Organization",
"url": "https://example.com",
"email": "admin@example.com"
}
}'{
"statusCode": 200,
"info": {
"issuerId": "https://api.badges.ninja/certify-badge/issuer/abc123-def456"
}
}API requests are subject to rate limiting. If you exceed the limit, you receive a 429 Too Many Requests response. Wait a few seconds and retry.
Some endpoints do not require authentication. These are the public verification endpoints under /certify-badge/ that allow anyone to verify badge credentials.