Help Center> API Gateway> User Guide> Old Console> API Management> Authorizing Apps to Call an API
Updated on 2023-05-06 GMT+08:00

Authorizing Apps to Call an API

Scenario

APIs using app authentication can only be called by apps that have been authorized to call them.

  • You can only authorize apps to call published APIs.
  • You can authorize apps only to call APIs that use app authentication.

Prerequisites

  • You have created an API group and API.
  • (Optional) You have created an environment.
  • You have created an app.

Procedure

  1. Log in to the management console.
  2. Click in the upper left corner and select a region.
  3. Click in the upper left corner and choose API Gateway.
  4. Choose a gateway type in the navigation pane.

    • Shared Gateway: You can create and manage APIs immediately. You will be billed based on the number of API calls.
    • Dedicated Gateways: You can create and manage APIs after purchasing a gateway. You will be billed based on the usage duration of the gateway.

  5. In the navigation pane, choose API Publishing > APIs.
  6. Authorize apps to call an API. You can use one of the following methods:

    • In the Operation column of the target API, choose More > Authorize App, and then click Select App.
    • Select the target API, click Authorize App over the API list, and then click Select App.
    • Authorize apps through the API details page.
      1. Click the name of the target API.
      2. Click the Authorization tab.
      3. Click Select App.

    To authorize an app to access multiple APIs, select the APIs, and click Authorize App. Click Select App, select the app you wish to authorize, and click OK. You can grant access to a maximum of 1000 APIs at a time.

  7. Select an environment, search for and select desired apps, and click OK.

  8. After the authorization is complete, view the authorized apps on the Authorization tab page or the Authorize App page.

    If an app does not need to call the API, click Cancel Authorization in the row containing the app to unbind it.

Authorizing an App by Calling an API

You can also authorize an app by calling an API provided by APIG. For details, see the following references:

Authorizing Apps

Canceling Authorization

Follow-Up Operations

After you authorize an app to call an API, the API can be called using SDKs of different programming languages.