Issue Org Service Account Token
curl --request POST \
--url https://api.studio.prisme.ai/v2/orgs/{orgSlug}/service-accounts/{saSlug}/token \
--header 'Content-Type: application/json' \
--data '
{
"clientSecret": "<string>"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({clientSecret: '<string>'})
};
fetch('https://api.studio.prisme.ai/v2/orgs/{orgSlug}/service-accounts/{saSlug}/token', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.studio.prisme.ai/v2/orgs/{orgSlug}/service-accounts/{saSlug}/token"
payload = { "clientSecret": "<string>" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"accessToken": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"tokenType": "Bearer",
"permissions": [
"<string>"
],
"scopes": [
"<string>"
]
}{
"error": "AuthenticationError",
"message": "Unauthenticated"
}Organizations
Issue Org Service Account Token
Exchange a service account client secret for a short-lived JWT token. No authentication required.
POST
/
v2
/
orgs
/
{orgSlug}
/
service-accounts
/
{saSlug}
/
token
Issue Org Service Account Token
curl --request POST \
--url https://api.studio.prisme.ai/v2/orgs/{orgSlug}/service-accounts/{saSlug}/token \
--header 'Content-Type: application/json' \
--data '
{
"clientSecret": "<string>"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({clientSecret: '<string>'})
};
fetch('https://api.studio.prisme.ai/v2/orgs/{orgSlug}/service-accounts/{saSlug}/token', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.studio.prisme.ai/v2/orgs/{orgSlug}/service-accounts/{saSlug}/token"
payload = { "clientSecret": "<string>" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"accessToken": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"tokenType": "Bearer",
"permissions": [
"<string>"
],
"scopes": [
"<string>"
]
}{
"error": "AuthenticationError",
"message": "Unauthenticated"
}Body
application/json
Response
JWT token issued
Was this page helpful?