Ensures API data-transmission security. Its core purposes are: preventing request tampering (relies on the secret key), preventing replay attacks (relies on the random string
onceand the timestamptime, valid for 8 hours), and confirming the request source (relies on the device numberprinter_id).
Signature Generation and Verification Flow
The platform provides a test device for debugging: Device Signature Debugging Tool.
1. Parameter Preparation
| Parameter | Description | Example Value |
|---|---|---|
printer_id |
Device number (the unique identifier assigned by the reseller, used to specify the target device) | RF10001 |
key |
Device secret key (a confidential string provided by the enterprise, used for signature encryption; must be kept strictly confidential) | a1b2c3d4e5 |
once |
Random string (4–10 characters recommended; prevents replay attacks and ensures each request is unique) | a1b2c3d4e5 |
time |
Timestamp (current UNIX time, in seconds, 10 digits; ensures signature timeliness, valid for 8 hours) | 1680000000 |
2. Parameter Concatenation
Concatenate the parameters into a string in key=value format, following these rules:
- Arrange in the predetermined parameter-name order (e.g.
printer_id→key→once→time). - Empty-value parameters do not participate in the signature.
- Case is strictly distinguished.
Example concatenated result: printer_id=RF10001&key=a1b2c3d4e5&once=7x9y2z&time=1680000000
3. Signature Encryption
Use the MD5 algorithm to encrypt the concatenated string, generating a 32-character lowercase signature string.
4. Request Verification
Pass the generated sign together with the above parameters into the API interface. The enterprise side recalculates the signature using the same flow and compares the result.
If the device encounters an unsolvable issue during debugging, contact the cloud-printing responsible person for troubleshooting and a resolution. Contact details:
Phone: 137-5177-4454 (same number on WeChat)
Email: info@ColorPark.cn