---
title: "Register an OAuth client (RFC 7591)"
method: POST
path: "/oauth2/register"
tags: ["OAuth"]
---

# Register an OAuth client (RFC 7591)

`POST /oauth2/register`

## Request

- Base URL: `https://codeatlas.com.br`
- URL: `https://codeatlas.com.br/oauth2/register`
- Auth: none required

Self-registers an agent and returns a client_id and client_secret. The secret is shown once and stored only as a hash. Limit: 10 per hour per IP. Only the client_credentials grant exists.

## Request body

- ClientRegistrationRequest
  - `client_name` string, required
  - `grant_types` string[]
  - `token_endpoint_auth_method` 'client_secret_basic' | 'client_secret_post'

## Response `201`

Client registered.

- ClientRegistrationResponse
  - `client_id` string, required
  - `client_secret` string, required: Shown once.
  - `client_id_issued_at` integer
  - `client_secret_expires_at` 0, required
  - `client_name` string
  - `grant_types` string[], required
  - `scope` 'api:write', required
  - `token_endpoint_auth_method` string, required

## Other responses

- `400`: invalid_client_metadata.
- `405`: The HTTP method is not supported.
- `413`: The body is larger than 16384 bytes.
- `415`: The body must be application/json.
- `429`: Rate limit exceeded. Wait Retry-After seconds.

---

[API](https://skmtc.dev/codeatlas/apis/codeatlas-public-api.md) · [All operations](https://skmtc.dev/codeatlas/apis/codeatlas-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/codeatlas/apis/codeatlas-public-api/revisions/fdb5ace63542?raw)
