Game Point API
The Game Point API provides endpoints for managing player game points and retrieving user scores for tournament rounds.
Overview
The Game Point API enables you to:
- Set Game Points: Submit player scores for specific tournament rounds
- Retrieve User Scores: Get a user's current score for a round
- Player Identification: Support both user ID and wallet address identification
- Tournament Integration: Connect scores to specific rounds and rooms
Endpoints
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/v2/game-point/ | Set or update a player's score for a round |
| GET | /api/v2/game-point/game-client/{roundId} | Get current user's score for a round |
| GET | /api/v2/game-point/game-client/{userId}/{roundId} | Get a user's score for a round (public) |
Authentication
The API uses different authentication methods for different endpoints:
Set New Point
Requires game key in header:
x-game-server-key: your-game-key-here
Get User Score
Requires user JWT token and game client headers:
Authorization: Bearer user-jwt-token-here
x-game-key: your-game-client-key
Get User Score by User ID (public)
No authentication. See Get User Score by User ID.
Point System
The point system supports:
- Round-based Scoring: Points are associated with specific tournament rounds
- Flexible Player ID: Identify players by user ID or wallet address
- Room Integration: Connect scores to specific game rooms
- Project Association: Optional linking to specific projects
- Simple Response: Returns confirmation message for successful submissions
Player Identification
Players can be identified using either:
- User ID: Internal user identifier
- Wallet Address: Blockchain wallet address
At least one of these must be provided when setting points.
Error Codes
| Code | Description |
|---|---|
| 400 | Bad Request - Invalid parameters |
| 401 | Unauthorized - Invalid authentication |
| 404 | Not Found - Resource not found |