How API consumers invoke an API with OAuth 2.0 authentication
How API consumers invoke an API with OAuth 2.0 authentication
To invoke a managed API where OAuth 2.0 authentication is enabled, API consumers generate an OAuth 2.0 authorization token and send the token to the managed API.
The following sections describe the stages of invoking a managed API that uses OAuth 2.0 authentication:
Generating an OAuth 2.0 authorization token
To generate the token, API consumers authenticate to the
Informatica Intelligent Cloud Services
OAuth 2.0 server using the server URL and the OAuth 2.0 client credentials that you send to the
API Portal
administrator.
API consumers use one of the following methods to provide the client credentials to the OAuth 2.0 server, based on the application or software package that they use to invoke the API:
Enter the OAuth 2.0 client ID and secret separately, as plain text. For example, in Postman, enter the client name in the
Client ID
field and the client secret ID in the
Client Secret
field. Select
Client Credentials
in the
Grant Type
field and enter the URL in the
Access Token URL
field.
Enter the client ID and the client secret as authentication header values encoded in a combined Base64 Basic authorization header. Select
Client Credentials
in the
Grant Type
field and enter the URL in the
Access Token URL
field.
The following image shows an API invocation through Postman with a Basic authorization header:
Sending the token to the managed API
API consumers pass the token that they receive from the OAuth 2.0 server to the managed API as an Authorization header with the prefix
Bearer
followed by the token.
The following image shows an API invoked through Postman with a Bearer Token authorization type and the token that the API consumer entered: