Esta página aún no está disponible en su idioma local. Estamos trabajando arduamente para agregar más versiones de idiomas. Gracias por tu apoyo.
API Request Signing Guide
API Request Signing Guide
-
Developer Guide
- Overview
- AK/SK Signing and Authentication Algorithm
- AK/SK Signing and Authentication Guide
- Error Codes
-
FAQs
- How Do I Call APIs in a Subproject?
- Does API Gateway Support Persistent Connections?
- Must the Request Body Be Signed?
- Are Request Header Parameters Required for Signing Requests?
- How Do I Use a Temporary AK/SK to Sign Requests?
- Common Errors Related to IAM Authentication Information
- What Should I Do If "The API does not exist or has not been published in the environment." Is Displayed?
- Change History
On this page
Show all
Help Center/
API Request Signing Guide/
Developer Guide/
FAQs/
How Do I Use a Temporary AK/SK to Sign Requests?
How Do I Use a Temporary AK/SK to Sign Requests?
Updated on 2023-01-17 GMT+08:00
Integrate the signing SDK into your application and add the following parameter and value to the message header:
X-Security-Token:{securityToken}
Then, use a temporary AK/SK to sign the request. The signing SDK can be the SDK used for AK/SK-based authentication.
- Create an API, set the authentication mode to IAM, and publish the API.
- Obtain a temporary AK/SK and {securityToken}. For details, see the Identity and Access Management API Reference.
A response similar to the following is displayed:
{ "credential": { "access": "P0HEQUQ4XBWXY5WD69X0", "expires_at": "2022-10-17T18:51:25.231000Z", "secret": "3WJuF1oMFSoSJSWKAWrhUVOVWvtAnATAbS61hDVs", "securitytoken": "XXXXXX......" } }
- Construct a request with signature parameters.
... request.setKey("P0HEQUQ4XBWXY5WD69X0"); request.setSecret("3WJuF1oMFSoSJSWKAWrhUVOVWvtAnATAbS61hDVs"); request.setMethod("GET"); request.setUrl("url"); request.addHeader("X-Security-Token", "XXXXXX......"); ...
Parent topic: FAQs
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.
The system is busy. Please try again later.