Get User Points
Retrieve a user's current game point balance by wallet address.
Endpoint Details
- Method:
GET - Path:
/get-points-by-address - Content-Type:
application/json
GET https://partner-api.example.com/get-points-by-address?address=0xabcd....aRequest Parameters
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
address | string | ✅ | User's wallet address (case-insensitive) |
Headers
| Header | Description | Example |
|---|---|---|
X-API-KEY | Your API key | your_api_key |
X-API-REQUEST | Unique UUID v7 | 01987d64-6519-747b-9200-beba98700464 |
X-API-SIGNATURE | HMAC signature | 92aa703cc483ea2cc90488c05e699179... |
Response Format
Success Response
HTTP Status: 200 OK
{
"success": true,
"partnerUserId": "123",
"address": "0xabcd....a",
"points": 1000,
"chain": "abstract",
// Optional: additional custom fields
}Required Fields
| Field | Type | Description |
|---|---|---|
success | boolean | Must be true |
partnerUserId | string | Your internal user ID |
address | string | Wallet address |
points | integer | Current point balance |
chain | string | Blockchain network |
Supported Chains
abstractroninethereum- Custom chain identifiers
Example Implementation
app.get('/get-points-by-address', async (req, res) => {
try {
// Validate authentication
if (!validateAuth(req.headers)) {
return res.json({
success: false,
errorCode: 'ERR-AUTH-FAILED',
errorMessage: 'Authentication failed'
});
}
const { address } = req.query;
// Find user by wallet address
const user = await findUserByWallet(address);
if (!user) {
return res.json({
success: false,
errorCode: 'ERR-USER-NOT-FOUND',
errorMessage: 'User not found'
});
}
res.json({
success: true,
partnerUserId: user.id,
address: address.toLowerCase(),
points: user.points,
chain: 'abstract'
});
} catch (error) {
res.json({
success: false,
errorCode: 'ERR-INTERNAL',
errorMessage: 'Internal server error'
});
}
});Testing
🧪
Test your implementation with various scenarios:
- Valid wallet address with points
- Valid wallet address with zero points
- Invalid/non-existent wallet address
- Malformed wallet address
- Missing authentication headers