Authentication

OAuth2 Token Endpoint

Obtain an OAuth2 access token using client credentials grant. The client_id is the agent's DID and client_secret is obtained from oauth_credentials.json.

Credentials location: .bindu/oauth_credentials.json

Grant type: client_credentials

Scopes:

  • openid: OpenID Connect scope
  • offline: Offline access
  • agent:read: Read agent data
  • agent:write: Write agent data
post/oauth2/token

Response

Access token granted

access_tokenstring required

The OAuth2 access token (JWT)

token_typestring required

Token type (always "bearer")

expires_ininteger required

Token expiration time in seconds

scopestring

Space-separated list of granted scopes

Example response

{
  "token_type": "bearer",
  "expires_in": 3599,
  "scope": "openid offline agent:read agent:write"
}

Changes