Do You Know Ball API

License & Developer Guide · v1.0

Overview

All endpoints are protected by API key authentication. Register an account, log in to get a token, use that token to generate an API key, then include it in every request.


Account Registration

Create an account by posting a username and password.

POST/register
{
  "username": "your_username",
  "password": "your_password"
}

Authentication

Log in to receive a JWT token. The token expires after 7 days.

POST/login
{
  "username": "your_username",
  "password": "your_password"
}
{ "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." }

Generating an API Key

Use your JWT token to generate an API key. Multiple keys per account are allowed.

POST/api-keys/generate
Authorization: Bearer <your_jwt_token>
{ "api_key": "3f7a2c1e8b4d9f0a6e5c2b1d8a7f4e3c..." }

Using Your API Key

Pass your API key in the X-API-Key header on every request.

X-API-Key: your_api_key_here
curl https://do-u-know-ball.com/endpoint \
  -H "X-API-Key: your_api_key_here"