Every request must include the following headers for authentication and security verification.
Header Key
Required
Example Value
Description
timestamp
Yes
1719834567890
Current timestamp in milliseconds.
signature
Yes
d41d8cd98f00b204e9800998ecf8427e
MD5 signature string (see generation rule below).
lang
Yes
en
Language preference (en for English, zh for Chinese).
Authorization
Yes
Bearer abc123...xyz
OAuth token. Required for all authenticated APIs.
️ Critical Security Note: Real-time Timestamp The timestamp must be generated in real-time for every single request. FoxCloud strictly validates the timeliness of this timestamp.
Expiration Check: Requests carrying timestamps that fall outside the acceptable time window will be immediately rejected.
Security Enforcement: Any request with an invalid signature or an expired timestamp will be blocked to prevent replay attacks. Do not cache or reuse old timestamps and signatures.
To ensure request integrity, the signature header must be generated using the following MD5 encryption logic:
1.
Construct the Source String: Concatenate the following three components using the literal string\r\n (backslash + r + backslash + n) as the separator: [API Endpoint URL]\r\n[Access Token]\r\n[Timestamp]
️ Common Pitfall Warning: The separator is the 4-character string\r\n, NOT an actual carriage return or line feed character (ASCII 0x0D 0x0A). Do not use your programming language's newline escape sequence.
2.
Encrypt: Perform MD5 hashing on the constructed source string.
3.
Set Header: Convert the MD5 result to lowercase and place it in the signature header.