curl --location 'https://stg.api.fire.rest/api/authentication/login' \
--header 'x-api-key: <your_api_key>' \
--header 'x-client-channel: integration' \
--header 'account: <your_account_id>' \
--header 'Content-Type: application/json' \
--data '{
"client_id": "<your_client_id>",
"client_secret": "<your_client_secret>",
"grant_type": "client_credentials"
}'
{
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
{
"error": {
"code": "unauthorized",
"message": "Invalid credentials"
}
}
API
Login
Troque suas credenciais de cliente por um token de acesso. Use o token retornado como Bearer token em todas as requisições subsequentes à API.
POST
/
api
/
authentication
/
login
curl --location 'https://stg.api.fire.rest/api/authentication/login' \
--header 'x-api-key: <your_api_key>' \
--header 'x-client-channel: integration' \
--header 'account: <your_account_id>' \
--header 'Content-Type: application/json' \
--data '{
"client_id": "<your_client_id>",
"client_secret": "<your_client_secret>",
"grant_type": "client_credentials"
}'
{
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
{
"error": {
"code": "unauthorized",
"message": "Invalid credentials"
}
}
string
obrigatório
Sua API key do Fire. Emitida pelo dashboard do Fire em Developers → API Management.
string
obrigatório
Deve ser
integration. Identifica a requisição como vinda de uma integração externa.string
obrigatório
Identificador da conta à qual a requisição pertence.
string
padrão:"application/json"
obrigatório
Deve ser
application/json para o corpo JSON.string
obrigatório
Identificador de cliente emitido pelo Fire.
string
obrigatório
Segredo de cliente emitido pelo Fire.
string
padrão:"client_credentials"
obrigatório
Tipo de grant OAuth 2.0. Deve ser
client_credentials.string
Token de acesso. Inclua-o no cabeçalho
Authorization: Bearer <accessToken> em todas as requisições à API.curl --location 'https://stg.api.fire.rest/api/authentication/login' \
--header 'x-api-key: <your_api_key>' \
--header 'x-client-channel: integration' \
--header 'account: <your_account_id>' \
--header 'Content-Type: application/json' \
--data '{
"client_id": "<your_client_id>",
"client_secret": "<your_client_secret>",
"grant_type": "client_credentials"
}'
{
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
{
"error": {
"code": "unauthorized",
"message": "Invalid credentials"
}
}

