AMBSlot API Document
  • Seamless API Document
    • Table of Contents
    • Change Logs
    • Notice
    • Encryption & Decryption
    • AMBSlot Seamless Integration APIs
      • Seamless API - Create Member
      • Seamless API - Change Password
      • Seamless API - Get Game List
      • Seamless API - Get Online User
      • Seamless API - Launch Lobby Client
      • Seamless API – Launch Selected Game Client
      • Seamless API – Get Round Result
    • Operator Seamless Integration APIs
      • Seamless API – Get Balance
      • Seamless API – Bet
      • Seamless API – Payout
      • Seamless API – Settle
      • Seamless API – Cancel
  • Transfer API Document
    • Table of Contents
    • Change Logs
    • Notice
    • Encryption & Decryption
    • AMBSlot Transfer Integration APIs
      • Transfer API - Create Member
      • Transfer API - Change Password
      • Transfer API - Get Game List
      • Transfer API - Deposit
      • Transfer API - Withdraw
      • Transfer API - Check Available Balance
      • Transfer API - Launch Selected Game Client
      • Transfer API - Launch Lobby Client
      • Transfer API - Get Round Result
      • Transfer API - Get Key Transfer
      • Transfer API - Get Report By Date And Time
      • Transfer API - Get Report By Date
      • Transfer API - Get Report 10 Minutes
      • Transfer API - Report Time 10 Minutes
Powered by GitBook
On this page
  • Encryption & Decryption Method and Process
  • Request with Encryption Example
  • Example for node.js
  • Example for php
  1. Seamless API Document

Encryption & Decryption

In AMBSlot Platform has use encryption and decryption to sign the request with secret key. For all seamless API requests have to be signed by Operator and successfully verify by AMBSlot.

Encryption & Decryption Method and Process

• AMBSlot generate secret key to operator once operator start development • The operator should send normal request body with the signature • The signature should be placed in ‘x-ambslot-signature‘ request header • The signature should be signed with RSA-SHA512 and encoded to BASE64 from request body • Request body must not be changed

Request with Encryption Example

POST /seamless/create HTTP/1.1
Content-Type: application/json
x-ambslot-signature:
ydBIzv35wvylsCjE9nsftTskgThTQAsQ+pcCGbX8yCe3VQTsvRuNsIIKqicWoqCEapVuqBJ9+XOIHO1Rj
K28jw==

    {
        "username": "player001",
        "password": "1234",
        "agent": "agent001"
    }

Example for node.js

const encryptRequest = (jsonStr) => {
    return crypto.pbkdf2Sync(jsonStr, 'secret_key_from_AMBSlot', 1000, 64, 
    'sha512').toString('base64') 
   }

Example for php

<?php
$password = '{"username":"USERNAME","password":"PASSWORD","agent":"AGENT"}';
$iterations = 1000;
$secret = "XXXXXXXXXXXXXXXXXXXXXXXXXXX";
$hash = hash_pbkdf2("sha512", $password, $secret, $iterations, 64, true);
echo base64_encode($hash);
PreviousNoticeNextAMBSlot Seamless Integration APIs

Last updated 2 years ago