---
title: "Gerar token — BeeFood API"
description: "POST /v1/oauth/token com grantType client_credentials: emissão do par accessToken e refreshToken."
url: "https://developer.beefood.com.br/docs/oauth/emitir-tokens"
group: "OAuth"
lang: "pt"
---
# Gerar token

`POST /v1/oauth/token`

- Produção: `https://api.beefood.app/v1/oauth/token`
- Sandbox: `https://api-sandbox.beefood.app/v1/oauth/token`

Emite o par de tokens da credencial.

## Body

| Campo | Tipo | Obrigatório | Descrição |
| --- | --- | --- | --- |
| grantType | string | sim | Define o contrato do body. Valor: `"client_credentials"`. |
| clientId | uuid | sim | Identificador público da credencial. |
| clientSecret | string | sim | Segredo devolvido apenas na criação da credencial. |

## Resposta de sucesso

```json
{
  "accessToken": "<jwt>",
  "refreshToken": "<jwt>",
  "expiresAt": "2026-08-18T16:00:00.000Z"
}
```

## Erros

| Status | Mensagem |
| --- | --- |
| 400 | grantType is required |
| 400 | grantType must be client_credentials or refresh_token |
| 400 | clientId is required |
| 400 | clientSecret is required |
| 401 | Invalid client credentials |
| 500 | Database error when trying to … |

