curl --request POST \
--url https://api.useanima.sh/v1/vault/token/exchange \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"token": "<string>"
}
'import requests
url = "https://api.useanima.sh/v1/vault/token/exchange"
payload = { "token": "<string>" }
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({token: '<string>'})
};
fetch('https://api.useanima.sh/v1/vault/token/exchange', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.useanima.sh/v1/vault/token/exchange",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'token' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.useanima.sh/v1/vault/token/exchange"
payload := strings.NewReader("{\n \"token\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.useanima.sh/v1/vault/token/exchange")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"token\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.useanima.sh/v1/vault/token/exchange")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"token\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"type": "login",
"name": "<string>",
"favorite": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"notes": "<string>",
"login": {
"username": "<string>",
"password": "<string>",
"uris": [
{
"uri": "<string>",
"match": "domain"
}
],
"totp": "<string>"
},
"card": {
"cardholderName": "<string>",
"brand": "<string>",
"number": "<string>",
"expMonth": "<string>",
"expYear": "<string>",
"code": "<string>"
},
"identity": {
"firstName": "<string>",
"lastName": "<string>",
"email": "jsmith@example.com",
"phone": "<string>",
"address1": "<string>",
"city": "<string>",
"state": "<string>",
"postalCode": "<string>",
"country": "<string>",
"company": "<string>",
"ssn": "<string>"
},
"oauthToken": {
"provider": "<string>",
"accessToken": "<string>",
"refreshToken": "<string>",
"tokenEndpoint": "<string>",
"clientId": "<string>",
"scopes": [
"<string>"
],
"expiresAt": "2023-11-07T05:31:56Z",
"clientSecret": "<string>",
"autoRefresh": true,
"allowedHosts": [
"<string>"
]
},
"apiKey": {
"provider": "<string>",
"key": "<string>",
"prefix": "<string>",
"rateLimit": {
"requests": 1,
"window": "<string>"
},
"expiresAt": "2023-11-07T05:31:56Z",
"scopes": [
"<string>"
],
"allowedHosts": [
"<string>"
],
"authHeader": "<string>",
"authScheme": "<string>"
},
"certificate": {
"format": "pem",
"certificate": "<string>",
"privateKey": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"chain": [
"<string>"
]
},
"fields": [
{
"name": "<string>",
"value": "<string>",
"type": "text"
}
],
"folderId": "<string>",
"organizationId": "<string>",
"collectionIds": [
"<string>"
],
"revealPolicy": "standard"
}Post vaulttokenexchange
curl --request POST \
--url https://api.useanima.sh/v1/vault/token/exchange \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"token": "<string>"
}
'import requests
url = "https://api.useanima.sh/v1/vault/token/exchange"
payload = { "token": "<string>" }
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({token: '<string>'})
};
fetch('https://api.useanima.sh/v1/vault/token/exchange', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.useanima.sh/v1/vault/token/exchange",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'token' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.useanima.sh/v1/vault/token/exchange"
payload := strings.NewReader("{\n \"token\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.useanima.sh/v1/vault/token/exchange")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"token\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.useanima.sh/v1/vault/token/exchange")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"token\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"type": "login",
"name": "<string>",
"favorite": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"notes": "<string>",
"login": {
"username": "<string>",
"password": "<string>",
"uris": [
{
"uri": "<string>",
"match": "domain"
}
],
"totp": "<string>"
},
"card": {
"cardholderName": "<string>",
"brand": "<string>",
"number": "<string>",
"expMonth": "<string>",
"expYear": "<string>",
"code": "<string>"
},
"identity": {
"firstName": "<string>",
"lastName": "<string>",
"email": "jsmith@example.com",
"phone": "<string>",
"address1": "<string>",
"city": "<string>",
"state": "<string>",
"postalCode": "<string>",
"country": "<string>",
"company": "<string>",
"ssn": "<string>"
},
"oauthToken": {
"provider": "<string>",
"accessToken": "<string>",
"refreshToken": "<string>",
"tokenEndpoint": "<string>",
"clientId": "<string>",
"scopes": [
"<string>"
],
"expiresAt": "2023-11-07T05:31:56Z",
"clientSecret": "<string>",
"autoRefresh": true,
"allowedHosts": [
"<string>"
]
},
"apiKey": {
"provider": "<string>",
"key": "<string>",
"prefix": "<string>",
"rateLimit": {
"requests": 1,
"window": "<string>"
},
"expiresAt": "2023-11-07T05:31:56Z",
"scopes": [
"<string>"
],
"allowedHosts": [
"<string>"
],
"authHeader": "<string>",
"authScheme": "<string>"
},
"certificate": {
"format": "pem",
"certificate": "<string>",
"privateKey": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"chain": [
"<string>"
]
},
"fields": [
{
"name": "<string>",
"value": "<string>",
"type": "text"
}
],
"folderId": "<string>",
"organizationId": "<string>",
"collectionIds": [
"<string>"
],
"revealPolicy": "standard"
}Authorizations
JWT Bearer token obtained from authentication. Pass as: Authorization: Bearer
Body
Input for exchanging a vault token for credential data
The vault token (vtk_) to exchange for credential data
Response
OK
Full credential record returned from the vault
Unique credential identifier
Credential type
login, secure_note, card, identity, oauth_token, api_key, certificate User-defined credential name
Whether the credential is marked as a favorite
Timestamp when the credential was created
Timestamp when the credential was last updated
Free-form notes attached to the credential
Login credential data, present when type is login
Show child attributes
Show child attributes
Card credential data, present when type is card
Show child attributes
Show child attributes
Identity credential data, present when type is identity
Show child attributes
Show child attributes
OAuth token data, present when type is oauth_token
Show child attributes
Show child attributes
API key data, present when type is api_key
Show child attributes
Show child attributes
Certificate data, present when type is certificate
Show child attributes
Show child attributes
Custom fields attached to the credential
Show child attributes
Show child attributes
Folder the credential belongs to
Organization the credential is scoped to
Collections the credential is shared with
Reveal policy governing whether plaintext may be returned (default 'standard')
standard, brokered 