Updated on 2022-12-05 GMT+08:00

(Optional) Authorizing Apps to Call an API

Overview

Only APIs that use the App authentication mode need to be authorized to specified integration applications. When a user calls an API, the key and secret of the integration application are used for authenticating API requests.

If Simple Authentication is enabled for an API, the AppCode configured in the integration application can be used for simple security authentication, and the key and secret do not need to be used for signature authentication.

The integration application to which the API belongs can be directly used to call the API without authorization.

Prerequisites

  • The security authentication mode of the API is set to App.
  • The API has been published in an environment. Otherwise, publish the API first.

Granting Permissions for Integration Applications

  1. Log in to the ROMA Connect console. On the Instances page, click View Console next to a specific instance.
  2. In the navigation pane, choose API Connect > API Management. On the APIs tab page, choose Authorize App.
  3. On the Authorize App page, click Select App.
  4. In the Select App dialog box, configure authorization information and click OK.
    After the authorization is complete, click on the left of the API to view the list of authorized integration applications.
    Table 1 Authorization configuration

    Parameter

    Description

    Environment

    Select the environment in which the API to be authorized has been published.

    Integration Application

    Select the integration application to which the API calling permission is to be assigned.

    Access Parameters

    Set access parameters for the authorized integration application. The access parameters will be added to the backend signature authentication information and sent to a backend service. The backend service then returns different response parameters based on the carried access parameters.

    Green Channel

    Determine whether to enable the green channel. After the green channel is enabled, you also need to set Whitelist and Blacklist.

    Whitelist

    This parameter is mandatory only if Green Channel is enabled.

    Enter the IP addresses or IP address segments to be added to the whitelist. The IP addresses in the whitelist can call APIs without authentication.

    Blacklisted

    This parameter is available only if Green Channel is enabled.

    Enter the IP addresses or IP address segments to be added to the blacklist. The IP addresses in the blacklist are not allowed to call APIs.

Adding AppCode

  1. Log in to the ROMA Connect console. On the Instances page, click View Console next to a specific instance.
  2. In the navigation pane on the left, choose API Connect > API Calling. On the Clients tab page, click the name of the client (that is, the integration application) authorized by the API.
  3. On the AppCode tab page of the client details page, click Add AppCode.
  4. In the dialog box displayed, configure AppCode information and click OK.
    Table 2 AppCode configuration

    Parameter

    Description

    AppCode Type

    Select the method for generating AppCode.

    • Automatically generated: AppCode is randomly generated by the system.
    • Custom: Enter a user-defined AppCode.

    AppCode

    Enter the value of AppCode.