API Key

API Credentials

Your secure API integration keys.

Authentication Keys

Keep these tokens secret!

This prefix is automatically pre-pended to all your User IDs.

https://oxentech.asia/api/devtools.php
https://demo.com/api/webapi/Callback.php

System Integration

// npm install axios
const axios = require('axios');

const API_CONFIG = {
    url: 'https://oxentech.asia/api/devtools.php',
    token: 'YOUR_API_TOKEN',
    secret: 'YOUR_SECRET_KEY'
};

async function launchGame(user, gameCode) {
    try {
        const payload = {
            ValidationToken: API_CONFIG.token,
            GameId: gameCode,
            PlayerId: user.id,
            PlayerName: user.username,
            Currency: 'INR',
            ReturnUrl: 'https://your-site.com/exit'
        };

        const response = await axios.post(API_CONFIG.url, payload);
        
        if(response.data.status === 200) {
            return response.data.gameUrl;
        } else {
            console.error('Launch Error:', response.data.msg);
        }
    } catch (error) {
        console.error('API Error:', error.message);
    }
}
// Express.js Route Handler
app.post('/api/callback', async (req, res) => {
    const data = req.body;
    
    // 1. Get Balance
    if(data.Type === 'getBalance') {
        const balance = await db.getUserBalance(data.PlayerId);
        return res.json({
             status: 200,
             balance: balance
        });
    }

    // 2. Deduct Bet
    if(data.Type === 'deductBalance') {
        const newBal = await db.deductUser(data.PlayerId, data.amount);
        return res.json({
            status: 200,
            balance: newBal
        });
    }

    // 3. Add Win
    if(data.Type === 'addToBalance') {
        const newBal = await db.creditUser(data.PlayerId, data.amount);
        return res.json({
            status: 200,
            balance: newBal
        });
    }
    
    res.json({ status: 400, msg: 'Unknown Type' });
});