---
title: "Get an access token (RFC 6749 client_credentials)"
method: POST
path: "/oauth2/token"
tags: ["OAuth"]
---

# Get an access token (RFC 6749 client_credentials)

`POST /oauth2/token`

## Request

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

Exchanges credentials for a signed JWT valid for 3600 seconds. grant_type=client_credentials: authenticate with HTTP Basic or with client_id and client_secret in the form body. grant_type=urn:workos:agent-auth:grant-type:claim: send the claim_token from POST /agent/identity; answers authorization_pending until the person confirms the user_code, slow_down if polled faster than every 5 seconds, expired_token after 600 seconds. Use resource=https://codeatlas.com.br/api/sandbox/v1 for the sandbox. Limit: 30 per minute per IP.

## Response `200`

Access token.

- TokenResponse
  - `access_token` string, required
  - `token_type` 'Bearer', required
  - `expires_in` 3600, required
  - `scope` string, required

## Other responses

- `400`: invalid_request, unsupported_grant_type, invalid_scope or invalid_target.
- `401`: invalid_client.
- `405`: The HTTP method is not supported.
- `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)
