Mint API key
curl --request POST \
--url http://127.0.0.1:4100/api/actors/{id}/keys \
--header 'Content-Type: application/json' \
--header 'x-alibi-api-key: <api-key>' \
--data '
{
"label": "<string>"
}
'import requests
url = "http://127.0.0.1:4100/api/actors/{id}/keys"
payload = { "label": "<string>" }
headers = {
"x-alibi-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-alibi-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({label: '<string>'})
};
fetch('http://127.0.0.1:4100/api/actors/{id}/keys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"prefix": "<string>",
"label": "<string>",
"secret": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}{
"error": "<string>"
}Auth
Mint API key
Creates a new API key for an actor. Response includes the one-time secret.
POST
/
actors
/
{id}
/
keys
Mint API key
curl --request POST \
--url http://127.0.0.1:4100/api/actors/{id}/keys \
--header 'Content-Type: application/json' \
--header 'x-alibi-api-key: <api-key>' \
--data '
{
"label": "<string>"
}
'import requests
url = "http://127.0.0.1:4100/api/actors/{id}/keys"
payload = { "label": "<string>" }
headers = {
"x-alibi-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-alibi-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({label: '<string>'})
};
fetch('http://127.0.0.1:4100/api/actors/{id}/keys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"prefix": "<string>",
"label": "<string>",
"secret": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}{
"error": "<string>"
}