Updated on 2026-02-09 GMT+08:00

Overview

This document describes how to call cloud service APIs registered with API Gateway using the AK/SK signature authentication. You need to obtain the API information and AK/SK by referring to Obtaining API Information and Obtaining an AK/SK first, and then perform signature authentication based on the signature SDK and calling example of each language by referring to Java Signing Guide, Go Signing Guide, Python Signing Guide, C# Signing Guide, JavaScript Signing Guide, PHP Signing Guide, C++ Signing Guide, C Signing Guide and Android Signing Guide. If the preceding signing examples do not contain the programming language you use, sign requests according to the API Signature Authentication Mechanism and Example of the API Signature Authentication Mechanism.

  • For the authentication of certain cloud service APIs that are not registered with API Gateway, see the API Reference of the corresponding service.
  • For the APIs provided by a cloud service, see the API Reference of the cloud service. The API Reference contains a section named "Calling APIs" that describes API authentication methods.
  • The SDK of each programming language is packaged in the sample code and can be obtained separately. You can integrate the SDK into your application by referring to the API calling example.
  • AK/SK authentication supports API requests with a body less than or equal to 12 MB. For API requests with a larger body, token authentication is recommended. The description and example of token-based authentication are included in the section "Authentication" in the API reference of each cloud service.
  • The local time on the client must be synchronized with the clock server to avoid a large offset in the value of the X-Sdk-Date request header.

    API Gateway checks the time format and compares the time with the time when API Gateway receives the request. If the time difference exceeds 15 minutes, API Gateway will reject the request.