Updated on 2023-09-01 GMT+08:00

Calling

The following figure shows the process of calling an API.

  1. Obtain an AK/SK for authentication.

    Request authentication is required for calling an API. After successful authentication, the authentication field is filled into the next method to request for message construction.

    AK/SK authentication is used for calling APIs.

    AK/SK authentication: Requests are encrypted using AK/SK pairs.

    When you send requests to underlying services through the API gateway, the requests must be signed using access key ID (AK) and secret access key (SK).

    • AK: access key ID, which is a unique identifier used with a secret access key to sign requests cryptographically.
    • SK: secret access key. It is used together with an access key ID to identify a sender who initiates a request and to cryptographically sign requests, preventing the request from being modified.

    1. For details about how to obtain the SDK, see Calling APIs Through App Authentication.

    2. For details about how to obtain an AK/SK, see AK/SK Authentication.

  2. Construct a request.

    Configure the request parameters to construct a request.

  3. Initiate the request.
  4. Parse the response.