Welcome to Our API

Explore our API documentation to integrate and interact with our services.

Base URL: http://999dice.net/api

Authentication

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.

Rate Limiting

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."
                }
            }
Error Handling

API responses include appropriate status codes to indicate success or failure. Common codes include:

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 (If Required)

Webhooks are available for specific events (e.g., new bet placed). Register your webhook URL, and we will notify you of these events.

CORS Support

This API supports CORS (Cross-Origin Resource Sharing) to allow requests from different domains. Please ensure you configure your CORS settings appropriately.

API Key Regeneration

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.

SDKs and Libraries

We provide SDKs and libraries in various languages for easier integration with our API. Check our GitHub page for available SDKs.

Changelog

Our API is continuously improving. Check the changelog for updates on new features, bug fixes, and breaking changes.

Request Throttling Information

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.