Generate Bearer Token
Generate a bearer token using database credentials to authenticate API requests and securely access A2A server endpoints for calling in-database AI agents.
See Configure MCP Server in AI Agent Application for more information.
Example
Send a POST request to the token endpoint.
curl -X POST 'https://dataaccess.adb.{region-identifier}.oraclecloudapps.com/adb/auth/v1/databases/{database-ocid}/token' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"grant_type": "password",
"username": "<database-username>",
"password": "<database-password>"
}'
Replace the placeholders with your specific values.
-
region-identifier: The specific Oracle Cloud region. For example,us-chicago-1. -
database-ocid: The OCID of your A2A enabled Autonomous AI Database instance. -
grant_type: Specifies the OAuth grant type. Usepassword. -
username: Database username. -
password: Database password.