Skip to content

Obtain Game Signature ​

This API must be called on the server side. Never call it directly from the frontend (APP client, web page, mini game, etc.) to avoid the risk of credential leakage. Used to obtain the game security signature.

API Description ​

API English name game.getSignature

Description Obtain the signature data of a specified game for launching the game by signature and accessing its metadata, such as the game name, icon, and version.

Note: This API requires secondary encryption and signing of server-to-server communication: request parameters must be encrypted and signed, and responses must be signature-verified and decrypted. This effectively prevents data tampering and leakage.

Call Method ​

HTTPS Call ​

http
POST /v1/game/signature?access_token=ACCESS_TOKEN

Prepend the base URL for your application's service region to the API path. See Service Regions and API Addresses.

Request Parameters - Query ​

FieldTypeDefaultRequiredDescription
access_tokenstringYesAPI call credential

Request Parameters - Body ​

FieldTypeDefaultRequiredDescription
game_idstringYesUnique game identifier

Return Value ​

The returned JSON data packet

FieldTypeDescription
errcodeint32Error code
errmsgstringError message
secret_enc_typenumberPackage key encryption method, 0: plaintext, 1: XOR obfuscation + Base64, 2: reserved
game_meta_strstringGame metadata JSON string
game_signature_hashstringThe signature value corresponding to game_meta_str

game_meta_str Field Description ​

game_meta_str is a serialized JSON string. After parsing, its structure is as follows:

FieldTypeDescription
game_idstringUnique game identifier
game_nameobjectGame name (multi-language)
game_iconstringLegacy game icon URL
iconobjectGame icon URLs by language, using the same map structure as game_name; language tags such as zh-CN are keys and default is the default value
game_versionstringGame version number
code_versionstringCode version number
package_urlstringGame resource package download URL
package_md5stringmd5 value of the game package
package_secretstringGame package decryption key, with the encryption method determined by secret_enc_type
secret_enc_typenumberPackage key encryption method, 0: plaintext, 1: XOR obfuscation + Base64, 2: reserved
timestampnumberSignature generation timestamp (seconds)
expiresnumberValidity period length (seconds)
has_sub_packagebooleanWhether sub-packages exist

Call Example ​

Note: The request example below shows the business data before encryption; what is actually sent is the ciphertext with signature headers, and the response example shows the business data after signature verification and decryption. See Server API Signature and Encryption for the packaging and signing rules.

Request Data Example ​

json
{
  "game_id": "xxx"
}

Response Data Example ​

json
{
  "errcode": 0,
  "errmsg": "ok",
  "secret_enc_type": 1,
  "game_meta_str": "{\"game_id\":\"2038447928785162241\",\"game_name\":{\"default\":\"opdemo\",\"zh-CN\":\"opdemo\"},\"game_icon\":\"https://example.com/icon.png\",\"icon\":{\"default\":\"https://example.com/icon.png\",\"zh-CN\":\"https://example.com/icon-zh-CN.png\"},\"game_version\":\"3.0.0\",\"code_version\":\"0\",\"package_url\":\"https://example.com/game-package.zip\",\"package_md5\":\"00000000000000000000000000000000\",\"package_secret\":\"ZXhhbXBsZV9wYWNrYWdlX3NlY3JldA==\",\"secret_enc_type\":1,\"timestamp\":1779950105,\"expires\":3600,\"has_sub_package\":false}",
  "game_signature_hash": "xxx"
}

The example response illustrates the data structure and cannot be used to launch a game.