This section describes how to call an API after this API is released on API Gateway.
Three elements for calling an API
- API: the API that you are about to call, which is clearly defined by the API parameters.
- app: Identity that you use to call the API. The AppKey and AppSecret are provided to authenticate your identity.
- Permission relationship between the API and app: When an app needs to call an API, the app must have the permission of this API. This permission is granted through authorization.
- Get the API documentation
The acquisition method varies according to the channel that you use to obtain the API. It is generally divided into API services purchased from the data market and not required to purchase, two ways are actively authorized by the provider. For more information, see get API documentation.
- Create a project
The app is the identity that you use to call an API. Each app has a set of AppKey and AppSecret, which are equivalent to an account and a password. For more information, see creating an application.
- Get the permission
Authorization means granting an app the permission to call an API. Your app must be authorized first to call an API.
The authorization method varies according to the channel that you use to obtain the API. For more information, see obtaining authorization.
- Call API
You can directly use the multi-language call sample provided by API Gateway Console, or use a self-compiled HTTP or HTTPS request to call the API. For more information, see calling the API.