---
title: "Renovar token — BeeFood API"
description: "POST /v1/oauth/token com grant_type refresh_token: renovar tokens de Conectar com BeeFood."
url: "https://developer.beefood.com.br/docs/oauth/renovar-conexao"
group: "OAuth"
lang: "pt"
---
# Renovar token

`POST /v1/oauth/token`

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

Renova os tokens da conexão autorizada pelo lojista.

Content-Type: application/json (application/x-www-form-urlencoded também aceito)

| Body | Required | Description |
| --- | --- | --- |
| grant_type | yes | refresh_token |
| client_id | yes | Integrator identifier |
| refresh_token | yes | Current store refresh token |

```bash
curl -X POST 'https://api.beefood.app/v1/oauth/token' -H 'Content-Type: application/json' -d '{"grant_type":"refresh_token","client_id":"Repediu","refresh_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2FwaS5iZWVmb29kLmFwcCIsInN1YiI6InN0b3JlXzhhMTJkNmVmIiwiYXVkIjoiYmVlZm9vZC1hcGkiLCJzY29wZSI6Im9mZmxpbmVfYWNjZXNzIiwianRpIjoiY2Q3MWE4NDAiLCJpYXQiOjE3OTA5MzUyMDAsImV4cCI6MTc5MzUyNzIwMH0.c2ltdWxhZG8tYXBlbmFzLWV4ZW1wbG8"}'
```

## Resposta 200

```json
{
  "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2FwaS5iZWVmb29kLmFwcCIsInN1YiI6InN0b3JlXzhhMTJkNmVmIiwiYXVkIjoiYmVlZm9vZC1hcGkiLCJzY29wZSI6Im9yZGVyczpyZWFkIG1lbnU6cmVhZCIsImp0aSI6ImU4ZDJjMzE0IiwiaWF0IjoxNzkwOTM1MjAwLCJleHAiOjE3OTA5Mzg4MDB9.c2ltdWxhZG8tYXBlbmFzLWV4ZW1wbG8",
  "token_type": "Bearer",
  "expires_in": 3600,
  "refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2FwaS5iZWVmb29kLmFwcCIsInN1YiI6InN0b3JlXzhhMTJkNmVmIiwiYXVkIjoiYmVlZm9vZC1hcGkiLCJzY29wZSI6Im9mZmxpbmVfYWNjZXNzIiwianRpIjoiZjAzYTE5YjciLCJpYXQiOjE3OTA5MzUyMDAsImV4cCI6MTc5MzUyNzIwMH0.c2ltdWxhZG8tYXBlbmFzLWV4ZW1wbG8"
}
```

O access token vale 1 hora e o refresh token 30 dias. Cada renovação invalida o refresh anterior imediatamente. Salve o novo par de forma atômica, uma renovação por restaurante de cada vez. Após 401, solicite nova conexão.

