# controller\_oauth2\_access\_token

Source: https://zotonic.com/docs/2266/controller_oauth2_access_token

URI: https://zotonic.com/id/2266

Language: en



Exchange OAuth 2.0 credentials for a bearer access token.

The JSON endpoint supports the `authorization_code` and `client_credentials` grant types. It validates the client id and secret, and for authorization codes also the code and redirect URI. Successful responses contain the token type, user id, user data, and `expires_in` when applicable.

License: 

Attribution: 

Related resources: https://zotonic.com/api/agent/related/2266?language=en


## API access

- [API help](<https://zotonic.com/api-help>)
- [OpenAPI specification](<https://zotonic.com/openapi.json>)
- [This resource as JSON](<https://zotonic.com/api/agent/resource/2266?language=en>)
