Menu

Open API Protocol

1. Request Notes

  1. Case Sensitivity: API parameters are case-sensitive. Ensure all values follow the documented format.
  2. Signature Required: Each API request must include a valid sign; otherwise, the request will fail.
  3. QPM Rate Limit: The maximum is 10 requests per minute. If you exceed 10 requests within one minute, the system will return "Request Too Frequent". You must wait until the next minute to send requests again.

2.Common Request Parameters

  • Header
FileParameterRequired
Content-Typeapplication/jsonY


  • Body
ParameterTypeRequiredInstruction
client_idstringYPlease contact your admin or sub-admin to obtain it and ensure Open API permissions have been activated.
timestampintYunix timestamp when requested
signstringYmd5(client_secret+timestamp)
………………other parameter


  • Request Example
{
    "client_id": "xxx",
    "timestamp": 1608776690,
     "sign": "05d481dc241a7a1daa5b2a7fa2b51dc5",
    "...": "..."
}


3. About "sign"

  • Pass client_id, timestamp, sign in the request parameters to pass the authentication, and "sign" is generated by "client_secret" and "timestamp" according to the encryption rules.
  • Encryption rule is md5(client_secret + timestamp).
  • The default validity period of timestamp is 30s. If it exceeds 30s, an interface timeout will be reported.
  • You shall inquiry to your admin or sub-admin for the "client_id" and "client_secret" mentioned above. The API Token Management entry is located in the personal profile at the top right corner of the platform.


4.Sample Codes of "sign"

//java Sample

import org.apache.commons.codec.digest.DigestUtils;

public static String getSign(String clientSecret) {
	long timestamp = System.currentTimeMillis()/1000;
	String oriSign = clientSecret + timestamp;
	String sign = DigestUtils.md5Hex(oriSign);
	return sign;
}



//python Sample

import hashlib
import time

def get_sign(clientSecret):  
	timestamp = int(time.time())
	oriSign = clientSecret+str(timestamp)    
	encodeSign = str(oriSign).encode()  
	sign = hashlib.md5(encodeSign)
	return sign.hexdigest()


	
//php Sample

function getSign($clientSecret)
{
	$timestamp = time();
	$oriSign = $clientSecret . $timestamp;
	$sign = md5($oriSign);
	return $sign;
}



//go Sample

import (
	"time"
	"strconv"
	"app/util/encrypt"
)

func getSign(clientSecret string) string {
	timestamp := time.Now().Unix()
	sign := encrypt.Md5(fmt.Sprintf("%s%s", clientSecret, strconv.FormatInt(timestamp, 10)))
	return sign
}


5.Status Description

Error codeDescription
0success
-1error
400001error request parameter


Previous
XMP Open API
Next
Ad Report API
Last modified: 2025-09-26Powered by