AK/SK Authentication
- AK: access key ID, which is a unique identifier used in conjunction with a secret access key to sign requests cryptographically.
- SK: secret access key used in conjunction with an AK to sign requests cryptographically. It identifies a request sender and prevents the request from being modified.
Generating an AK and SK Pair
If an AK/SK pair has already been generated, skip this step. Find the downloaded AK/SK file, which is usually named credentials.csv.
As shown in the following figure, the file contains the username, access key ID, and secret access key.
- Log in to the console.
- Hover the mouse pointer over the username and choose My Credentials from the drop-down list.
- Click the Access Keys tab.
- Click Create Access Key.
- Enter the verification code or login password as prompted, and click OK to download the access key. Keep the access key secure.
Generating a Signature
Generate a signature in the same way as in App authentication mode. Replace AppKey with AK and replace AppSecret with SK to complete the signing and request processing. You can sign requests to access APIs by using Java, Go, Python, C#, JavaScript, PHP, C++, C, and Android.
The local time on the client must be synchronized with the clock server to avoid a large error in the value of the X-Sdk-Date request header.
APIG (API Management) checks the time format and compares the time with the time when APIG (API Management) receives the request. If the time difference exceeds 15 minutes, APIG will reject the request.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot