This guide will help you complete the integration of the Gas Station platform API, including API creation, key retrieval, and parameter encryption.

Step 1: Create an API on the Gas Station Platform

  1. Log in to the Gas Station platform.
  2. In the left navigation bar, select API Management.
  3. Click the Create API button, fill in the relevant information, and submit.
  4. After successful creation, the API will appear in the API list.

Step 2: View the API’s app_id and Key

  1. On the API Management page, find the API you just created.
  2. Click the API to enter the details page.
  3. On the details page, you can see the app_id. To view the key, you need to verify your identity through signature verification before it is displayed (please keep the key safe and do not disclose it).

Step 3: Encrypt API Request Parameters with the Key Using AES

When calling the API, you need to encrypt the request parameters using the key with AES encryption. Common AES modes include ECB, CBC, CFB, OFB, and CTR, and PKCS7 is a commonly used padding method. Please confirm the required encryption mode and padding method with the platform before encrypting.

Note:

  • The key length must match the encryption algorithm (e.g., 16 bytes for AES-128, 24 bytes for AES-192, 32 bytes for AES-256).
  • The plaintext must be padded before encryption, commonly using PKCS7 padding.
  • Implementations may vary in different programming languages. Please refer to the official documentation or SDK.
  • Keep your key safe and do not disclose it.

For more information on AES encryption modes, padding methods, and online encryption/decryption tools, see AES Encryption Tool(You are about to leave Gas Station, please pay attention to the safety of your account and property).