Create Access Token
curl --request POST \
--url https://api.studio.prisme.ai/v2/user/accessTokens \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expiresAt": "<string>",
"name": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({expiresAt: '<string>', name: '<string>'})
};
fetch('https://api.studio.prisme.ai/v2/user/accessTokens', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.studio.prisme.ai/v2/user/accessTokens"
payload = {
"expiresAt": "<string>",
"name": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"expiresAt": "<string>",
"name": "<string>",
"token": "<string>",
"userId": "<string>",
"id": "<string>"
}{
"error": "BadParameters",
"message": "<string>",
"details": "<unknown>"
}{
"error": "AuthenticationError",
"message": "Unauthenticated"
}API Gateway
Create Access Token
Create a personal access token
POST
/
v2
/
user
/
accessTokens
Create Access Token
curl --request POST \
--url https://api.studio.prisme.ai/v2/user/accessTokens \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expiresAt": "<string>",
"name": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({expiresAt: '<string>', name: '<string>'})
};
fetch('https://api.studio.prisme.ai/v2/user/accessTokens', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.studio.prisme.ai/v2/user/accessTokens"
payload = {
"expiresAt": "<string>",
"name": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"expiresAt": "<string>",
"name": "<string>",
"token": "<string>",
"userId": "<string>",
"id": "<string>"
}{
"error": "BadParameters",
"message": "<string>",
"details": "<unknown>"
}{
"error": "AuthenticationError",
"message": "Unauthenticated"
}Authorizations
BearerAuthOrgApiKeyAuthBearerAuth & OrgApiKeyAuth
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Was this page helpful?