API Documention

₹0.00 INR

Aviator API Documentation

API Endpoint

POST https://api.yoursite.com/aviator/bet

Authentication


Headers:
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

PHP Example


<?php
$ch = curl_init("https://api.yoursite.com/aviator/bet");

$data = json_encode([
  "user_id" => "123",
  "amount" => 100
]);

curl_setopt($ch, CURLOPT_HTTPHEADER, [
  "Authorization: Bearer YOUR_API_KEY",
  "Content-Type: application/json"
]);

curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$response = curl_exec($ch);
curl_close($ch);

echo $response;
?>

Node.js Example


const axios = require("axios");

axios.post("https://api.yoursite.com/aviator/bet", {
  user_id: "123",
  amount: 100
}, {
  headers: {
    Authorization: "Bearer YOUR_API_KEY"
  }
})
.then(res => console.log(res.data))
.catch(err => console.error(err));