Create an API key
curl --request POST \
--url https://api.glassmarkets.io/v1/user/api-keys/ \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"password": "<string>",
"name": "<string>",
"scopes": [],
"code": "<string>"
}
'import requests
url = "https://api.glassmarkets.io/v1/user/api-keys/"
payload = {
"password": "<string>",
"name": "<string>",
"scopes": [],
"code": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({password: '<string>', name: '<string>', scopes: [], code: '<string>'})
};
fetch('https://api.glassmarkets.io/v1/user/api-keys/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": 123,
"name": "<string>",
"prefix": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"key": "<string>",
"scopes": "<unknown>",
"last_used_at": "2023-11-07T05:31:56Z"
}Account
Create an API key
Creates a scoped API key after password and, when enabled, two-factor verification. The secret value is returned only in this response.
Create an API key
curl --request POST \
--url https://api.glassmarkets.io/v1/user/api-keys/ \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"password": "<string>",
"name": "<string>",
"scopes": [],
"code": "<string>"
}
'import requests
url = "https://api.glassmarkets.io/v1/user/api-keys/"
payload = {
"password": "<string>",
"name": "<string>",
"scopes": [],
"code": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({password: '<string>', name: '<string>', scopes: [], code: '<string>'})
};
fetch('https://api.glassmarkets.io/v1/user/api-keys/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": 123,
"name": "<string>",
"prefix": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"key": "<string>",
"scopes": "<unknown>",
"last_used_at": "2023-11-07T05:31:56Z"
}Authorizations
Token-based authentication with required prefix "Token ". Example: "Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b"
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data

