# OAuth 2.0 API

The OAuth 2.0 operations of the BuildBase HTTP API: method, path, sign-in, request fields, answers and errors for each.

12 operations, 10 fully described. For how this part of BuildBase works, start with the [guide](/authentication/overview).

| Method | Path                                                                                                           | What it does                                                           |
| ------ | -------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- |
| POST   | [`/api/v1/auth/oauth2/agent/identity`](/http-api/reference/oauth-2-0/oauth2-agent-identity-create)             | Register an agent for a person by their email address                  |
| POST   | [`/api/v1/auth/oauth2/agent/identity/claim`](/http-api/reference/oauth-2-0/oauth2-agent-identity-claim-create) | Renew the confirmation code of an agent registration                   |
| GET    | [`/api/v1/auth/oauth2/authorize`](/http-api/reference/oauth-2-0/oauth2-authorize-list)                         | Start an OAuth 2.0 authorization code request                          |
| GET    | [`/api/v1/auth/oauth2/callback/{tokenId}`](/http-api/reference/oauth-2-0/oauth2-callback-get)                  | Complete sign-in and redirect to the client with an authorization code |
| POST   | [`/api/v1/auth/oauth2/device_authorization`](/http-api/reference/oauth-2-0/oauth2-device-authorization-create) | Start a device authorization request                                   |
| POST   | [`/api/v1/auth/oauth2/introspect`](/http-api/reference/oauth-2-0/oauth2-introspect-create)                     | Introspect a refresh token                                             |
| POST   | [`/api/v1/auth/oauth2/register`](/http-api/reference/oauth-2-0/oauth2-register-create)                         | Register an OAuth client dynamically                                   |
| GET    | [`/api/v1/auth/oauth2/register/{clientId}`](/http-api/reference/oauth-2-0/oauth2-register-get)                 | Get a dynamically registered client's configuration                    |
| PUT    | [`/api/v1/auth/oauth2/register/{clientId}`](/http-api/reference/oauth-2-0/oauth2-register-update)              | Update a dynamically registered client's configuration                 |
| DELETE | [`/api/v1/auth/oauth2/register/{clientId}`](/http-api/reference/oauth-2-0/oauth2-register-delete)              | Delete a dynamically registered client                                 |
| POST   | [`/api/v1/auth/oauth2/revoke`](/http-api/reference/oauth-2-0/oauth2-revoke-create)                             | Revoke a refresh token                                                 |
| POST   | [`/api/v1/auth/oauth2/token`](/http-api/reference/oauth-2-0/oauth2-token-create)                               | Exchange a grant for an access token                                   |

## Related

- [API reference](/http-api/reference): every tag
- [OAuth 2.0 guide](/authentication/overview)
