Skip to content

API Keys & Callback URLs

Each operator has one API key that is used for:

  • Authentication — the key identifies the operator in API calls
  • Request signing — the secret is used to compute HMAC-SHA256 signatures

The API key and callback URLs are configured in the operator detail page.


Navigate to Operators → select an operator → API Keys tab.

  1. Click Create API Key
  2. The system generates an API Secret — the HMAC signing secret (AUTH_TOKEN), shown only once!. It is prefixed with bxr_ (production) or dev_ (sandbox/local), followed by a random URL-safe token. There is no separate public key; your operator is identified by its casino_id (slug).
  3. Copy the secret immediately — it will not be displayed again

If you need a new secret (e.g. it was compromised):

  1. Click Regenerate
  2. A new secret is generated — the old one is immediately invalidated
  3. Copy the new secret and update your system

Click Delete to remove the API key entirely. The operator will not be able to launch games until a new key is created.


Navigate to Operators → select an operator → Callback URLs tab.

Enter the 4 wallet callback URLs that Beexar will call during gameplay:

FieldEndpointDescription
Balance URLPOST /balanceFetch player balance
BetWin URLPOST /betwinDebit/credit player account (atomic)
Rollback URLPOST /rollbackReverse previous transactions
Finish URLPOST /finishSignal round completion
  1. Enter each URL in the corresponding field
  2. Click Save
  3. The URLs take effect immediately for new game sessions
Balance URL: https://api.casino.com/beexar/balance
BetWin URL: https://api.casino.com/beexar/betwin
Rollback URL: https://api.casino.com/beexar/rollback
Finish URL: https://api.casino.com/beexar/finish
RequirementDetails
ProtocolHTTPS required
AvailabilityMust be publicly accessible from Beexar servers
Response timeShould respond within 10 seconds

The API secret signs the request body; the resulting HMAC goes in the X-REQUEST-SIGN header:

Terminal window
BODY='{"casino_id":"your-slug","game":"dice","account":{"id":"player_1","currency":"USD"}}'
SECRET="your_api_secret"
SIGNATURE=$(echo -n "$BODY" | openssl dgst -sha256 -hmac "$SECRET" | awk '{print $2}')
curl -X POST https://gateway.beexar.com/api/v1/softswiss/launcher/real \
-H "Content-Type: application/json" \
-H "X-REQUEST-SIGN: $SIGNATURE" \
-d "$BODY"

Beexar signs every wallet request with the same secret. Your server must validate the X-REQUEST-SIGN header:

const crypto = require('crypto');
function validateSignature(body, signature, secret) {
const expected = crypto.createHmac('sha256', secret)
.update(body)
.digest('hex');
return crypto.timingSafeEqual(
Buffer.from(signature),
Buffer.from(expected)
);
}

See Authentication for code samples in Go, Python, PHP, and more.