List the share codes of a template
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://vms.dev/api/v1/templates/{id}/share-codes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://vms.dev/api/v1/templates/{id}/share-codes \
--header 'Authorization: Bearer <token>'import requests
url = "https://vms.dev/api/v1/templates/{id}/share-codes"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"id": "tsc_06d8k3m7q2v9x4b1n5c0e8f2ja",
"templateId": "tpl_06d8k3m7q2v9x4b1n5c0e8f2ja",
"label": "partner-team",
"codeEnd": "8f2j",
"lastUsedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z"
}
]
}{
"error": {
"code": "no_capacity",
"message": "<string>",
"requestId": "<string>",
"retryAfterSeconds": 4503599627370495,
"sandboxId": "<string>"
}
}{
"error": {
"code": "no_capacity",
"message": "<string>",
"requestId": "<string>",
"retryAfterSeconds": 4503599627370495,
"sandboxId": "<string>"
}
}{
"error": {
"code": "no_capacity",
"message": "<string>",
"requestId": "<string>",
"retryAfterSeconds": 4503599627370495,
"sandboxId": "<string>"
}
}{
"error": {
"code": "no_capacity",
"message": "<string>",
"requestId": "<string>",
"retryAfterSeconds": 4503599627370495,
"sandboxId": "<string>"
}
}{
"error": {
"code": "no_capacity",
"message": "<string>",
"requestId": "<string>",
"retryAfterSeconds": 4503599627370495,
"sandboxId": "<string>"
}
}Templates
List the share codes of a template
Returns the share codes of the template, oldest first. The list shows the last 4 characters of each code, not the code. Needs the templates:read or the templates:write scope.
GET
/
v1
/
templates
/
{id}
/
share-codes
List the share codes of a template
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://vms.dev/api/v1/templates/{id}/share-codes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://vms.dev/api/v1/templates/{id}/share-codes \
--header 'Authorization: Bearer <token>'import requests
url = "https://vms.dev/api/v1/templates/{id}/share-codes"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"id": "tsc_06d8k3m7q2v9x4b1n5c0e8f2ja",
"templateId": "tpl_06d8k3m7q2v9x4b1n5c0e8f2ja",
"label": "partner-team",
"codeEnd": "8f2j",
"lastUsedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z"
}
]
}{
"error": {
"code": "no_capacity",
"message": "<string>",
"requestId": "<string>",
"retryAfterSeconds": 4503599627370495,
"sandboxId": "<string>"
}
}{
"error": {
"code": "no_capacity",
"message": "<string>",
"requestId": "<string>",
"retryAfterSeconds": 4503599627370495,
"sandboxId": "<string>"
}
}{
"error": {
"code": "no_capacity",
"message": "<string>",
"requestId": "<string>",
"retryAfterSeconds": 4503599627370495,
"sandboxId": "<string>"
}
}{
"error": {
"code": "no_capacity",
"message": "<string>",
"requestId": "<string>",
"retryAfterSeconds": 4503599627370495,
"sandboxId": "<string>"
}
}{
"error": {
"code": "no_capacity",
"message": "<string>",
"requestId": "<string>",
"retryAfterSeconds": 4503599627370495,
"sandboxId": "<string>"
}
}