Pular para o conteúdo

Consultar a chave em uso

GET
/api/seller/external/v1/api-key/me
curl --request GET \
--get "https://api.spelt.com.br/api/seller/external/v1/api-key/me" \
--header "Authorization: Bearer splt_live_SUA_CHAVE" \
--header "Content-Type: application/json" \
--header "Accept: application/json"

Devolve a chave que fez a chamada e o que ela alcança: papel, somente leitura, ambiente e, por categoria, se lê, escreve e exclui. É por onde uma integração (ou um agente) descobre o próprio alcance antes de agir.

Media typeapplication/json
object
data
object
object
string
id
string
name
string
livemode
boolean
role
string
read_only
boolean
key_prefix
string
access
object
mode
string
role
string
read_only
boolean
categories
object
billing
object
read
boolean
write
boolean
delete
boolean
Example
{
"data": {
"object": "api_key",
"id": "...",
"name": "Agente financeiro",
"livemode": true,
"role": "financial",
"read_only": true,
"key_prefix": "splt_live_...",
"access": {
"mode": "key",
"role": "financial",
"read_only": true,
"categories": {
"billing": {
"read": true,
"write": false,
"delete": false
}
}
}
}
}