HTTP Header Key HTTP Header Value
X-Ca-Key AccessKey ID.
X-Ca-Timestamp Unix timestamp, in millisecond.
X-Ca-Nonce Random string. UUID is recommended.
Content-MD5 The result after Base64 encoding the MD5 digest value of the Body.
X-Ca-Signature Signature string.
X-Ca-Key: AccessKey ID, applied in Yealink Device Management Cloud Service for RPS Enterprise.
X-Ca-Timestamp: the Unix timestamp for calling the API time. Note that it is in millisecond and it is in
string format when adding to the Header.
X-Ca-Nonce: random string, Universally Unique Identifier (UUID) is recommended. It can be used
together with X-Ca-Timestamp to avoid replaying, refer to Section 1.3.6 for more information.
X-Ca-Signature: the signature string, refer to Section 1.3.3 for more information.
Content-MD5: the result after Base64 encoding the MD5 digest value of the Body.
Note:
When the Body is null (the content-Length is 0) or when the request parameter is Form
parameter, the Content-MD5 is not required in the Header.
For the interface provided in this document, when it is Body parameter, you need add
Content-MD5, but when it is Query parameter, you needn’t.
As we mentioned above, we do not recommend that you add the Query parameter to the
Body, if you do, you need add the Content-MD5.
The calculation method of Content-MD5 is described as below:
First, digest the Body by using MD5 algorithm to get the MD5 digest value. Note that the MD5
digest value is 128-bit binary number. Do not convert the MD5 digest value into the
string.
Second, encode the MD5 digest value by using Base64 to get Content-MD5. Note that the
MD5 digest value should be 128 bits.
If you use Java, use the following method to calculate:
Get bodyBytes, the byte array of the Body.
Digest the bodyBytes by using MD5 algorithm to get bodyMd5Bytes. Do not convert the
bodyMd5Bytes into string.
Encode the bodyMd5Bytes by using Bse64 to get the result. Note that the encoding object is
bodyMd5Bytes which should not be converted into string.
1.3.3. Calculating the Signature