Parameter | Description |
Method | Choose one of four available authentication methods. For more information, seeAuthentication Methods. |
Primary key | A primary authentication key must be between 6-40 characters and contains letters and numbers. |
Secondary key | A secondary authentication key must be between 6-40 characters and contains letters and numbers. |
Authentication parameter | An authentication parameter must be between 1-100 characters and contains letters, numbers and underscores. The parameter value will be authenticated by nodes. |
Validity period | Validity period of the authentication URL (1-630720000 seconds). It determines whether a client request is valid: If the time "timestamp + validity period" is reached, the request is considered expired and a 403 is returned. If it is not reached, the request is considered valid and will be authenticated. |
http://Hostname/Filename?sign=timestamp-rand-uid-md5hash
Field | Description |
Hostname | Site domain name. |
Filename | Path to access the resource, which must start with "/". |
sign | Custom name of the authentication parameter. |
timestamp | Unix timestamp. Format: A positive decimal integer, indicating the number of seconds elapsed since 00:00:00, January 1, 1970 at UTC. It does not change regardless of your time zone. |
rand | Random string, which contains letters and digits. Length: 0–100. |
uid | User ID (not in use), which defaults to 0. |
md5hash | A fixed-length 32-bit string calculated with the MD5 algorithm: Authentication algorithm: MD5 (/Filename-timestamp-rand-uid-key). Authentication logic: When receiving a valid request, the node starts comparing this string value with the md5hash value in the request URL. If they match, the node will respond to the request after it is authenticated, otherwise it returns a 403. |
http://Hostname/timestamp/md5hash/Filename
Field | Description |
Hostname | Site domain name. |
Filename | Path to access the resource, which must start with "/". |
timestamp | Timestamp. Format: YYYYMMDDHHMM (represented in UTC+8), such as 201807301000. |
md5hash | A fixed-length 32-bit string calculated with the MD5 algorithm: Authentication algorithm: MD5 (key + timestamp + /Filename). Authentication logic: When receiving a valid request, the node starts comparing this string value with the md5hash value in the request URL. If they match, the node will respond to the request after it is authenticated, otherwise it returns a 403. |
http://Hostname/md5hash/timestamp/Filename
Field | Description |
Hostname | Site domain name. |
Filename | Path to access the resource, which must start with "/". |
timestamp | Unix timestamp. Format: A positive hex integer, indicating the number of seconds elapsed since 00:00:00, January 1, 1970 at UTC. It does not change regardless of your time zone. |
md5hash | A fixed-length 32-bit string calculated with the MD5 algorithm: Authentication algorithm: MD5 (key + /Filename + timestamp). Note that you should remove the identifier 0x from a hex timestamp before calculation. Authentication logic: When receiving a valid request, the node starts comparing this string value with the md5hash value in the request URL. If they match, the node will respond to the request after it is authenticated, otherwise it returns a 403. |
http://Hostname/Filename?sign=md5hash&t=timestamp
Field | Description |
Hostname | Site domain name. |
Filename | Path to access the resource, which must start with "/". |
sign | Custom name of the authentication parameter. |
t | Custom name of the timestamp parameter. |
timestamp | Unix timestamp. Format: A positive decimal/hex integer, indicating the number of seconds elapsed since 00:00:00, January 1, 1970 at UTC. It does not change regardless of your time zone. |
md5hash | A fixed-length 32-bit string calculated with the MD5 algorithm: Authentication algorithm: MD5 (key + /Filename + timestamp). Note that you should remove the identifier 0x from a hex timestamp before calculation. Authentication logic: When receiving a valid request, the node starts comparing this string value with the md5hash value in the request URL. If they match, the node will respond to the request after it is authenticated, otherwise it returns a 403. |
http://www.example.com/test.jpg
with Method A:/foo.jpg
1647311432
. The timestamp is returned as a 10-digit positive decimal integer indicating that the authentication URL is generated at 10:30:32, March 15, 2022 (UTC+8).J0ehJ1Gegyia2nD2HstLvw
0
3C9mxSGzc8ZadmGNzE
/foo.jpg
-1647311432
-J0ehJ1Gegyia2nD2HstLvw
-0
-3C9mxSGzc8ZadmGNzE
) = ecce3150cbdaac83b116d937777ca77fhttp://www.example.com/foo.jpg?sign=1647311432-J0ehJ1Gegyia2nD2HstLvw-0-ecce3150cbdaac83b116d937777ca77f
md5hash
value with the md5hash
value in the request URL. If they match, the node will respond to the request after it is authenticated, otherwise it returns a 403.
Was this page helpful?