How to Generate a Signature
To ensure the security of API data transmission, the company mandates that third-party platforms generate a signature using specified parameters before submitting requests to the API. The specific process is as follows:
Signature Generation and Verification Process
The platform provides test device debugging: [Generate Device Signature Debugging Tool](https://colorpark.cn/admin/Debug/sign?history=1 "Device Signature Generation Debugging Tool")**
1. Parameter Preparation:
| Parameter Name | Description | Example Value |
|---|---|---|
| printer_id | Device ID (A unique identifier assigned by the agent, used to specify the target device) | RF10001 |
| key | Device Key (A confidential string provided by the enterprise, used for signature encryption; must be kept strictly confidential) | a1b2c3d4e5 |
| once | Random String (Recommended length: 4–10 characters; used to prevent replay attacks and ensure the uniqueness of each request) | a1b2c3d4e5 |
| time | Timestamp (Current UNIX time, accurate to the second; a 10-digit number used to ensure the timeliness of the signature; valid for 8 hours) | 1680000000 |
2. Parameter Concatenation
Concatenate the parameters into a string using the key=value format, subject to the following rules:
Arrange parameters according to a predefined order of parameter names (e.g., printer_id → key → once → time).
Parameters with empty values are excluded from the signature generation process.
Case sensitivity is strictly enforced.
Sample Concatenation Result:
printer_id=RF10001&key=a1b2c3d4e5&once=7x9y2z&time=1680000000
3. Signature Encryption。
use MD5 Algorithm Encrypt the concatenated string to generate 32-bit lowercase signature string:
4. Request Verification
Pass the generated signature, along with the aforementioned parameters, to the API interface; the enterprise system will then recalculate the signature using the same process and perform a comparison.
If you encounter any unresolved issues during the device commissioning process, please contact the Cloud Printing Administrator for troubleshooting and assistance in finding a solution. Contact details are as follows: Phone: 137-5177-4454 (Same number for WeChat) Email: info@ColorPark.cn