album.listPublicImages
public
List visitor photos in album order
Photo UUID keysets; after and before are exclusive. Default page size 30, maximum 60. Descriptions are excerpts.
Parameters
Passed by name in the params object.
| Name | Type | Required | Description |
|---|---|---|---|
alias |
string | no | Album alias (public albums only) |
id |
string | no | Album UUID (public albums only) |
token |
string | no | Share-link token |
after |
string | no | Photo UUID to page after |
before |
string | no | Photo UUID to page before |
limit |
integer | no | Page size 1-60; default 30 |
Result
Returns ImagePage:
| Field | Type | Description |
|---|---|---|
first_index * |
integer | |
images * |
array<Image> |
|
next_after * |
string | |
prev_before * |
string | |
total * |
integer |
Errors
| Code | Message | When |
|---|---|---|
2001 |
not_found |
No such resource owned by the caller. |
2002 |
validation_failed |
Malformed request; see error.data. |
4002 |
rate_limited |
Too many requests; wait before retrying. |
2003 |
cursor_stale |
The cursor photo is no longer visible; restart pagination. |
See the error reference for the full catalog, including the authentication codes.
Example
Request:
{
"jsonrpc": "2.0",
"id": 1,
"method": "album.listPublicImages",
"params": {
"token": "abcdefghijklmnopqrstuv",
"limit": 30
}
}
Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"images": [
{
"id": "018f3a7d-2b8c-7f1a-a4d5-6e7f8a9b0c1d",
"index": 1,
"title": "Mountain pass",
"description": "",
"alt": "Mountain pass",
"width": 640,
"height": 480,
"renders": [
{
"url": "https://img.example.com/r/018f3a7d-2b8c-7f1a-a4d5-6e7f8a9b0c1d/medium.webp?v=1",
"format": "webp",
"width": 640,
"height": 480
}
]
}
],
"first_index": 1,
"total": 1,
"next_after": "",
"prev_before": ""
}
}
curl
curl -s https://peinture.gumeniuk.com/rpc \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"album.listPublicImages","params":{"token":"abcdefghijklmnopqrstuv","limit":30}}'
JavaScript
const res = await fetch("https://peinture.gumeniuk.com/rpc", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
jsonrpc: "2.0", id: 1, method: "album.listPublicImages", params: {"token":"abcdefghijklmnopqrstuv","limit":30},
}),
});
const { result, error } = await res.json();
Go
body := []byte(`{"jsonrpc":"2.0","id":1,"method":"album.listPublicImages","params":{"token":"abcdefghijklmnopqrstuv","limit":30}}`)
req, _ := http.NewRequest("POST", "https://peinture.gumeniuk.com/rpc", bytes.NewReader(body))
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)