Welcome to Our API
Explore our API documentation to integrate and interact with our services.
Base URL: http://999dice.net/api
All API requests require an API key for authentication. You must include your API key in the request header or as a URL parameter.
GET /api/v1/authenticate
Description: Use this endpoint to authenticate users and receive a token.
Parameters:
{ "username": "string", "password": "string" }
Response:
{ "token": "string", "expires_in": 3600 }
Note: The token expires in the specified time (in seconds) and needs to be refreshed.
Our API implements rate limiting to ensure fair usage and prevent abuse. Below are the details about our rate limiting policy:
Rate Limiting Overview
All users are limited to 100 requests per minute. Once the limit is reached, further requests will be blocked until the next minute. A 429
status code will be returned if the limit is exceeded.
Response:
{ "status": false, "error": { "code": 429, "message": "Rate limit exceeded. Please try again later." } }
API responses include appropriate status codes to indicate success or failure. Common codes include:
- 200 OK: Request succeeded.
- 400 Bad Request: Invalid request or parameters.
- 401 Unauthorized: Missing or invalid API key.
- 404 Not Found: Resource not found.
- 500 Internal Server Error: Server error.
For endpoints that return lists (e.g., users, bets), we use pagination. Use the page
and per_page
parameters to control the pagination.
GET /api/v1/users?page=1&per_page=10
Response includes current_page
, total_pages
, and total_count
to help navigate through results.
Webhooks are available for specific events (e.g., new bet placed). Register your webhook URL, and we will notify you of these events.
This API supports CORS (Cross-Origin Resource Sharing) to allow requests from different domains. Please ensure you configure your CORS settings appropriately.
If you need to regenerate your API key, use the POST /api/v1/keys/regenerate
endpoint to obtain a new key. Make sure to update your systems accordingly.
We provide SDKs and libraries in various languages for easier integration with our API. Check our GitHub page for available SDKs.
Our API is continuously improving. Check the changelog for updates on new features, bug fixes, and breaking changes.
To prevent abuse and ensure the system runs smoothly, we have implemented request throttling. Users are limited to 100 requests per minute, and exceeding this limit will result in a 429 Too Many Requests
response. Please manage your request flow accordingly.