IBM Cloud Authentication
Use the IBM Cloud Authentication policy to authenticate with IBM Cloud and obtain an API key that can be used when sending requests to watsonx.ai.
Gateway support
| Gateway | Policy version |
|---|---|
| DataPower® API Gateway | 1.0.0 |
This topic describes how to configure the policy in the assembly user interface; for details on how to configure the policy in your OpenAPI source, see ibm-cloud-authentication.
About
The IBM Cloud Authentication policy provides an API key to the IBM Access Manager and, if successfully authenticated, returns a Bearer token to be used by all subsequent watsonx.ai operation requests. The Bearer token is cached and will be valid for approximately 60 minutes. A new token is retrieved when a response for the API key was not cached. or expired.
The IBM Cloud Authentication policy supports the properties shown in Table 2.
Properties
The following table lists the policy properties, indicates whether a property is required, specifies the valid and default values for input, and specifies the data type of the values.
| Property label | Required | Description | Data type |
|---|---|---|---|
| Title | No | The title of the policy; the default value is ibm-cloud-authentication. The
title displays in the API assembly editor in the UI. |
string |
| Description | No | A description of the policy. | string |
| API key | Yes | The API key, or a variable reference to the variable that contains an API key. The API key is used to authenticate subsequent watsonx.ai requests. | string |