Issue a vault access token
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({expiresIn: '24h'})
};
fetch('https://api.prudra.dev/vaults/{id}/tokens', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.prudra.dev/vaults/{id}/tokens"
payload = { "expiresIn": "24h" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)curl --request POST \
--url https://api.prudra.dev/vaults/{id}/tokens \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expiresIn": "24h"
}
'{}Vaults
Issue a vault access token
Short-lived token for vault-scoped access (e.g. for clients without the org API key).
POST
/
vaults
/
{id}
/
tokens
Issue a vault access token
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({expiresIn: '24h'})
};
fetch('https://api.prudra.dev/vaults/{id}/tokens', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.prudra.dev/vaults/{id}/tokens"
payload = { "expiresIn": "24h" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)curl --request POST \
--url https://api.prudra.dev/vaults/{id}/tokens \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expiresIn": "24h"
}
'{}
