Amazon Bedrock AgentCore is in preview release and is subject to change.
Obtain an access token to make gateway requests
To make MCP requests to a gateway, you need authorize the requests with an access token from the identity provider configured for the gateway's inbound authentication. The process for obtaining the token depends on the identity provider:
-
For Amazon Cognito, use the OAuth 2.0 token endpoint with client credentials flow.
-
For Auth0, use the OAuth 2.0 token endpoint with client credentials flow.
-
For other identity providers, refer to their documentation for obtaining access tokens.
After you receive the access token, specify it in the Authorization
header of your request, as in the following format:
Authorization: Bearer
${AccessToken}
To see examples of how to retrieve your access token with Amazon Cognito, select one of the following methods:
Replace the client_id
, client_secret
, and token_endpoint
with the values that were created when you configured inbound authorization.