Example to call API

Let’s take RegUserInfo as an example.

Encryption requires the following parameters

  • method (String, “RegUserInfo”)
  • Key (String, the Secret Key)
  • Time (DateTime, Current Time, in yyyyMMddHHmmss format)
  • Username (String)
  • CurrencyType (String)

method, Key and Time are always inserted. Other parameters please follow the parameter list in each API function.

Let say, the Secret Key is XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX and md5key is YYYYYYYY.

Example Query String (QS):

For example, q = ‘j4tjorjwarfj3trwise0safrwg2wt4awari0fwjfeoh’

Example MD5 String for building the signature (QS + md5key + Time + Key):

For example, s = ‘1234567890abcdef’

Resulting POST method query  (using “Content-Type: application/x-www-form-urlencoded”):

q=j4tjorjwarfj3trwise0safrwg2wt4awari0fwjfeoh&s=1234567890abcdef

POST to: http://<api-domain>/api/api.aspx

Output

Leave a Reply