Skip to main content
POST
/
oauth2
/
token
OAuth2 Token Endpoint
curl --request POST \
  --url https://hydra.getbindu.com/oauth2/token \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data grant_type=client_credentials \
  --data client_id=did:bindu:your_email_at_example_com:research_agent:9e84d316dd68482683ca3b3efc9c5500 \
  --data client_secret=45zleygc46gaAnLOkzMvsQ0Ui5D9fSH8FQQFCD0DwP8 \
  --data 'scope=openid offline agent:read agent:write'
{
  "access_token": "ory_at_69tIcwQJXca4HQPWnLedJ2z0BjSztuK_HOhaDuMjF34.k4HCnESo7ja5-OxuUtW8z6iWBcdc9f4ofHa-hBaDlk4",
  "expires_in": 3599,
  "scope": "openid offline agent:read agent:write",
  "token_type": "bearer"
}

Body

application/x-www-form-urlencoded
grant_type
enum<string>
required

OAuth2 grant type

Available options:
client_credentials
client_id
string
required

Agent DID (from oauth_credentials.json)

Example:

"did:bindu:your_email_at_example_com:research_agent:9e84d316dd68482683ca3b3efc9c5500"

client_secret
string
required

Client secret (from oauth_credentials.json)

Example:

"45zleygc46gaAnLOkzMvsQ0Ui5D9fSH8FQQFCD0DwP8"

scope
string
required

Space-separated list of scopes

Example:

"openid offline agent:read agent:write"

Response

Access token granted

access_token
string
required

The OAuth2 access token (JWT)

token_type
string
required

Token type (always "bearer")

Example:

"bearer"

expires_in
integer
required

Token expiration time in seconds

Example:

3599

scope
string

Space-separated list of granted scopes

Example:

"openid offline agent:read agent:write"