Mint an API key for the session user.
curl --request POST \
--url https://api.symbiosis.markets/auth/api-keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"label": "<string>",
"scopes": [
"<string>"
],
"expires_in_secs": 1
}
'import requests
url = "https://api.symbiosis.markets/auth/api-keys"
payload = {
"label": "<string>",
"scopes": ["<string>"],
"expires_in_secs": 1
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({label: '<string>', scopes: ['<string>'], expires_in_secs: 1})
};
fetch('https://api.symbiosis.markets/auth/api-keys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"api_key_id": "<string>",
"label": "<string>",
"scopes": [
"<string>"
],
"secret": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
}Auth
Mint an API key for the session user.
The response is the only time the secret is returned. Scopes are read, trade, withdraw, limited to those of the minting session.
POST
/
auth
/
api-keys
Mint an API key for the session user.
curl --request POST \
--url https://api.symbiosis.markets/auth/api-keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"label": "<string>",
"scopes": [
"<string>"
],
"expires_in_secs": 1
}
'import requests
url = "https://api.symbiosis.markets/auth/api-keys"
payload = {
"label": "<string>",
"scopes": ["<string>"],
"expires_in_secs": 1
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({label: '<string>', scopes: ['<string>'], expires_in_secs: 1})
};
fetch('https://api.symbiosis.markets/auth/api-keys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"api_key_id": "<string>",
"label": "<string>",
"scopes": [
"<string>"
],
"secret": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
}Body
application/json
Response
The only response that ever carries the raw secret.
The only response that ever carries the raw secret.