Pular para o conteúdo principal
POST
/
api
/
auth
/
token
Gerar token de acesso JWT
curl --request POST \
  --url https://api.public.firebanking.com.br/api/auth/token \
  --header 'Content-Type: application/json' \
  --header 'X-SSL-Client-Cert: <x-ssl-client-cert>' \
  --data '
{
  "clientId": "account-93-550e8400",
  "clientSecret": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6"
}
'
{
  "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "token_type": "Bearer",
  "expires_in": 1800
}
Este endpoint gera um token JWT de acesso válido por 30 minutos (1800 segundos). Requer certificado X.509 vinculado à conta e credenciais OAuth 2.0.
O certificado X.509 deve ser enviado URL-encoded no header X-SSL-Client-Cert. O certificado deve estar previamente vinculado à sua conta.

Cabeçalhos

X-SSL-Client-Cert
string
obrigatório

Certificado PEM do cliente codificado em URL (header padrão do NGINX)

Exemplo:

"-----BEGIN%20CERTIFICATE-----%0AMIIBkTCB..."

Corpo

application/json
clientId
string
obrigatório

OAuth 2.0 client ID obtido da criação de credencial

Exemplo:

"account-93-550e8400"

clientSecret
string
obrigatório

OAuth 2.0 client secret (8-64 caracteres)

Exemplo:

"a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6"

Resposta

Token gerado com sucesso

access_token
string
obrigatório

JWT access token

Exemplo:

"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."

token_type
string
obrigatório

Tipo do token

Exemplo:

"Bearer"

expires_in
number
obrigatório

Tempo de expiração do token em segundos

Exemplo:

1800