API Documentation
Base URL
The base URL for all API endpoints is: https://auth.cmpf-tools.de/api
How it works
This API allows third-party applications to verify and retrieve Campfire user information using an OAuth-like flow.
To authenticate, the application must first redirect the user to https://auth.cmpf-tools.de/login to obtain a temporary code.
This endpoint requires three query parameters:
client_id: The client ID provided during application registrationredirect_uri: The URI to redirect the user to after verification (must match the registered redirect URI)club_id: The ID of the Campfire club where the user will verify their identitychannel_id: The ID of the channel within the club where the user will post the verification codestate: A random string to prevent CSRF attacks (will be returned as-is in the redirect)
The user is then prompted to enter this code in the verification channel on their Campfire server.
Once the code has been received, the user is redirected back to the application with the code as a query parameter.
The application can then exchange this code for the Campfire user object by making a POST request to the Code Exchange endpoint.
Subsequent requests to the API can be made using the user's ID to retrieve user information or search for users by username.
All endpoints require basic authentication using the client id and secret.
Endpoints
- Code Exchange - Exchange a code for the campfire user object
- Get User - Get a user object by ID
- Search Users - Search for users by username
Code Exchange
POST /api/exchange
Query Parameters:
code: The temporary code obtained from the /login endpoint
Example Request:
POST https://auth.cmpf-tools.de/api/exchange?code=YOUR_CODE_HERE
Response:
Returns a JSON object with the following structure:
{
"id": "E:3I7ZXKS4BN252MFQQ6GX7ROZOPJNA3RITFEIPUZGJ324ESDJ2RVA",
"username": "topi314",
"displayName": "topi",
"avatarUrl": "https://niantic-social-api.nianticlabs.com/images/d56f9d1dd0df4dcb",
"badges": [
{
"badgeType": "PGO_COMMUNITY_AMBASSADOR",
"alias": "PGO_COMMUNITY_AMBASSADOR"
}
],
"gameProfiles": [
{
"id": "PGO-TEAM_YELLOW-PokeTrainerTopi",
"game": "PGO",
"codename": "PokeTrainerTopi",
"displayName": "",
"level": 50,
"faction": "Team Instinct",
"factionColor": "#FF9900",
"visibility": "EVERYONE",
"lastPlayedTimestampMs": 1760486400000
}
]
}
Get User
GET /api/users/{id}
Path Parameters:
id: The ID of the user to retrieve
Example Request:
GET https://auth.cmpf-tools.de/api/users/E:3I7ZXKS4BN252MFQQ6GX7ROZOPJNA3RITFEIPUZGJ324ESDJ2RVA
Response:
Returns a JSON object with the same structure as the Code Exchange response.
Search Users
GET /api/users?username={username}
Query Parameters:
username: The username to search for (case-insensitive, partial matches allowed)
Example Request:
GET https://auth.cmpf-tools.de/api/users?username=topi
Response:
Returns a JSON array of user objects matching the search criteria, each with the same structure as the Code Exchange response.