Skip to main content
POST
/
api
/
auth
/
certificate
Autenticar via certificado
curl --request POST \
  --url https://api-hml.valid.com/api/auth/certificate \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "client_id": 123,
  "client_secret": "<string>",
  "certificate": "<string>"
}
'
{
  "token_type": "Bearer",
  "expires_in": 10800,
  "access_token": "eyJ0eXAiOiJKV1QiLCJhbGci...",
  "refresh_token": "def502001234abc..."
}

Request Body

client_id
integer
required
ID do cliente OAuth. Exemplo: 1
client_secret
string
required
Segredo do cliente OAuth. Exemplo: seu-client-secret
certificate
string
required
Certificado digital em base64 (formato X.509). Exemplo: MIIDdzCCAl+gAwIBAgIEU0B...

Response

token_type
string
Tipo do token. Exemplo: Bearer
expires_in
integer
Tempo de expiração em segundos. Exemplo: 10800
access_token
string
Token de acesso JWT. Exemplo: eyJ0eXAiOiJKV1QiLCJhbGci...
refresh_token
string
Token para atualização. Exemplo: def502001234abc...
{
  "token_type": "Bearer",
  "expires_in": 10800,
  "access_token": "eyJ0eXAiOiJKV1QiLCJhbGci...",
  "refresh_token": "def502001234abc..."
}