album.sharing.resetToken
bearer
Reset the owner share link
Retires and replaces an existing bearer link atomically in any publication state. Publication mode and history remain unchanged.
Parameters
Passed by name in the params object.
| Name | Type | Required | Description |
|---|---|---|---|
album_id |
string | yes |
Result
Returns sharingDTO:
| Field | Type | Description |
|---|---|---|
album_id * |
string | |
alias_quota * |
aliasQuotaDTO |
|
aliases * |
array<aliasDTO> |
|
cover * |
coverDTO |
|
last_published_mode |
string | |
links * |
sharingLinksDTO |
|
mode * |
string | |
moderation |
sharingModerationDTO |
|
policy * |
sharingPolicyDTO |
|
published_at |
string | |
republish |
republishDTO |
|
server_publishing * |
boolean | |
state * |
string | |
stats * |
sharingStatsDTO |
Errors
| Code | Message | When |
|---|---|---|
2001 |
not_found |
No such resource owned by the caller. |
1003 |
forbidden |
Not the owner, or outside a token's scope. |
2002 |
validation_failed |
Malformed request; see error.data. |
See the error reference for the full catalog, including the authentication codes.
Example
Request:
{
"jsonrpc": "2.0",
"id": 1,
"method": "album.sharing.resetToken",
"params": {
"album_id": "018f3a80-1c2d-7e00-9a00-0b1c2d3e4f50"
}
}
Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"album_id": "018f3a80-1c2d-7e00-9a00-0b1c2d3e4f50",
"mode": "private",
"state": "private",
"links": {},
"aliases": [],
"alias_quota": {
"used": 0,
"limit": 20
},
"policy": {
"show_location": false,
"show_date": true,
"show_camera": false,
"allow_download": false,
"feed": true,
"order": "taken_asc",
"cover_focus": "center"
},
"cover": {
"is_default": true,
"was_reset": false
},
"stats": {
"visible": 0,
"total": 0,
"breakdown": {
"processing": 0,
"failed": 0,
"too_small": 0,
"taken_down": 0
},
"exif": {
"location": {
"visible": 0,
"disabled_on_photo": 0
},
"date": {
"visible": 0,
"disabled_on_photo": 0
},
"camera": {
"visible": 0,
"disabled_on_photo": 0
}
},
"captioned": 0,
"exposing_location": 0
},
"server_publishing": true
}
}
curl
curl -s https://peinture.gumeniuk.com/rpc \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"album.sharing.resetToken","params":{"album_id":"018f3a80-1c2d-7e00-9a00-0b1c2d3e4f50"}}'
JavaScript
const res = await fetch("https://peinture.gumeniuk.com/rpc", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": `Bearer ${token}`,
},
body: JSON.stringify({
jsonrpc: "2.0", id: 1, method: "album.sharing.resetToken", params: {"album_id":"018f3a80-1c2d-7e00-9a00-0b1c2d3e4f50"},
}),
});
const { result, error } = await res.json();
Go
body := []byte(`{"jsonrpc":"2.0","id":1,"method":"album.sharing.resetToken","params":{"album_id":"018f3a80-1c2d-7e00-9a00-0b1c2d3e4f50"}}`)
req, _ := http.NewRequest("POST", "https://peinture.gumeniuk.com/rpc", bytes.NewReader(body))
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer "+token)
resp, err := http.DefaultClient.Do(req)