POST
/
v2
/
oauth
/
token
curl --request POST \
  --url https://seu-dominio.com/v2/oauth/token \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "grant_type": "client_credentials",
  "public_id": "SEU_PUBLIC_ID",
  "secret": "SEU_SECRET"
}
'
{
  "access_token": "<string>",
  "token_type": "Bearer",
  "expires_in": 3600
}

Authorizations

Authorization
string
header
required

NavePay: no Basic Auth, use Username = public_id da chave de API e Password = secret em texto puro (mesmos valores exibidos ao criar a chave no painel). Equivale ao par OAuth2 client_id / client_secret quando usado no corpo JSON.

Body

application/json
grant_type
enum<string>
Available options:
client_credentials
public_id
string

Identificador público da chave (NavePay)

secret
string<password>

Secret em texto puro da chave (NavePay)

client_id
string

Alias OAuth2 de public_id

client_secret
string<password>

Alias OAuth2 de secret

Response

OK

access_token
string
token_type
string
Example:

"Bearer"

expires_in
integer
Example:

3600