Skip to main content
POST
/
api
/
auth
/
token
Gerar JWT access token
curl --request POST \
  --url https://sandbox.ntxpay.com/api/auth/token \
  --header 'Content-Type: application/json' \
  --header 'X-SSL-Client-Cert: <api-key>' \
  --data '
{
  "clientId": "qr-93-550e8400",
  "clientSecret": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6"
}
'
{
  "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "token_type": "Bearer",
  "expires_in": 600,
  "scope": "email profile"
}

Authorizations

X-SSL-Client-Cert
string
header
required

Certificado X.509 do cliente em PEM URL-encoded

Headers

X-SSL-Client-Cert
string
required

Certificado X.509 em PEM URL-encoded

Body

application/json
clientId
string
required

OAuth 2.0 client ID emitido durante o signup

Example:

"qr-93-550e8400"

clientSecret
string
required

OAuth 2.0 client secret (8-64 caracteres)

Required string length: 8 - 64
Example:

"a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6"

Response

Token gerado

access_token
string

JWT de acesso

Example:

"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."

token_type
string
Example:

"Bearer"

expires_in
integer

Tempo de expiração em segundos

Example:

600

scope
string
Example:

"email profile"