freespin_addplayer.md 2.6 KB

Freespin Create

Description

By using this method, operators can add players to the existing free round bonuses. Players can only participate in the same activity once.

Request method:( Host-> BeSoft):post

Encoding method:application/x-www-form-urlencoded

Besoft The response data format is: application/json

Method URL

{besoftapi}/api/bonus/addplayer

Hash computation

Hash code is calculated through the following steps: Obtain all parameters (expected hash) from the request POST parameters and append them to the string:

  • 1. Sort all parameters in alphabetical order.
  • 2. Append them in key1=value1&key2=value2 (if the values are not empty)
    1. Additional key, namely:

      key1=value1&key2=value&hashkey=djds83h^&*j3u5j32
      
    1. Calculate the hash using MD5 and convert it to all uppercase letters.
    1. Append the name "hash" to the parameter instead of the hashkey field. The final parameter is:

      key1=value1&key2=value&hash=3E8ABC6949A0A0CFF9110CF1128FBE25
      
    1. If the comparison between the platform and the hash parameter fails. Send error code 1008.

Request Parameters

| Name | Type | Required | Description | | :--------: | :---------: | :--: | :--------------------------------------------------: | | extension1 | string | Y | Agent account | | cert | string | Y | Security code | | bonuscode | String(128) | Y | The unique reward identifier in the operator system | | playerlist | string | Y | The list of player ids to be added to the existing free round rewards (separated by commas) | | hash | string | Y | The requested hash code |

Example

  • URL:
  • HTTP Method
    • POST
  • Form Data

    Content-Type: application/x-www-form-urlencoded

    extension1:         adminweb
    cert:               v8VMKKzlPpD0te4rX99Hgefs3PQrBFWJKiuUqg6Y
    bonuscode:          aaabbbccc
    playerlist:         2515,454156,55415415,6156416,75415456,81564564
    hash:               165BB0FEEB254154DE1AEF36E7ED48C2
    

Return Result

| Name | Type| Description | |:--------:|:-----:|:--------:| | ret | int | status code | | info | string | Result description |

## Successful Result

{
	"ret": -1,
	"info": "ok"
}

## Failed Result

{
	"ret": 1008,
	"info": "param erro"
}