curl --request POST \
--url https://api.malga.io/v1/auth \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--header 'X-Client-Id: <api-key>' \
--data '
{
"scope": [
"tokens"
],
"expires": 31104000
}
'{
"clientId": "cc0b1e41-2936-45c5-947f-93995ffcdc00",
"publicKey": "<YOUR_PUBLIC_KEY>",
"scope": [
"tokens"
],
"expires": 31104000,
"createdAt": "20200110 00:00:00"
}{
"error": {
"type": "api_error",
"code": 123,
"declinedCode": "<string>",
"key": "<string>",
"businessCode": "<string>",
"message": "<string>",
"details": "<array>"
}
}{
"error": {
"type": "api_error",
"code": 123,
"declinedCode": "<string>",
"key": "<string>",
"businessCode": "<string>",
"message": "<string>",
"details": "<array>"
}
}Client-token
Criar nova chave pública para uso no client-side
POST
/
v1
/
auth
curl --request POST \
--url https://api.malga.io/v1/auth \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--header 'X-Client-Id: <api-key>' \
--data '
{
"scope": [
"tokens"
],
"expires": 31104000
}
'{
"clientId": "cc0b1e41-2936-45c5-947f-93995ffcdc00",
"publicKey": "<YOUR_PUBLIC_KEY>",
"scope": [
"tokens"
],
"expires": 31104000,
"createdAt": "20200110 00:00:00"
}{
"error": {
"type": "api_error",
"code": 123,
"declinedCode": "<string>",
"key": "<string>",
"businessCode": "<string>",
"message": "<string>",
"details": "<array>"
}
}{
"error": {
"type": "api_error",
"code": 123,
"declinedCode": "<string>",
"key": "<string>",
"businessCode": "<string>",
"message": "<string>",
"details": "<array>"
}
}Body
application/json
Creat authentication token
Determina o escopo de endpoints que a chave terá acesso. Use graphql para a Analytics API (POST /v1/graphql)
Available options:
customers, cards, tokens, charges, webhooks, sessions, auth, flows, sellers, providers, subscriptions, graphql Prazo de validade da chave em segundos a partir da criação, zero para não expirar
Response
Created
Determina o escopo de endpoints que a chave terá acesso. Use graphql para a Analytics API (POST /v1/graphql)
Available options:
customers, cards, tokens, charges, webhooks, sessions, auth, reports, flows, sellers, providers, subscriptions, graphql Prazo de validade da chave em segundos a partir da criação, zero para não expirar
Identificador do cliente na Malga
Chave pública criada
Was this page helpful?