API calls with simple identity authentication

Updated at:

Simple identity authentication is ideal for debugging APIs in a workgroup or testing API calls. To authenticate a call, you must provide the AppCode and a valid AppKey from the application that owns the API. This topic describes how to use Postman to call an API that uses simple identity authentication.

Background information

To call an API that uses simple identity authentication, you must add the following parameters to the HTTP request header.

Parameter name

Description

Example

Date

The request time in GMT format.

Fri, 18 Jun 2021 07:14:23 GMT

Authorization

The application's AppCode, a space, and the AppKey.

productcode 3FQoSpxUbCgz5bCss

Prerequisites

  • The target API uses simple identity authentication.

  • Postman is installed.

Procedure

  1. You can open Postman and click the image button at the top to open a new request tab. The following list describes the items on the page.

    Number

    Description

    ①

    A custom name for the interface.

    ②

    The request method, typically GET or POST.

    ③

    The access path of the API.

    ④

    A parameter name.

    ⑤

    A parameter value.

    ⑥

    The Send button. Click to send the request.

  2. You can select the GET or POST request method and enter the API access path. For instructions on how to obtain the access path, see Step 6 in Obtain API call information.image

  3. You can click the Headers tab, add the 'Date' parameter to the KEY column, and enter the current time in GMT format in the VALUE column.

    image

  4. You can add the 'Authorization' parameter to the KEY column and enter the Authorization value in the VALUE column. The Authorization value consists of the AppCode and the AppKey, separated by a space. For instructions on how to obtain the AppCode and AppKey, see Step 5 and Step 6 in Obtain API call information.

  5. Optional: If the API requires request parameters, you can click the Params tab and add the parameter names and values to the KEY and VALUE columns.image

    Note

    If the API does not have request parameters, you can skip this step.

  6. You can click Send. If the request is successful, the results are returned.

    image