Get Photos library folders
GET
/api/v1/photos/library-roots
const url = 'https://example.com/api/v1/photos/library-roots';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/api/v1/photos/library-roots \ --header 'Authorization: Bearer <token>'Requires a signed-in User. It returns the relative Home folders included in the Photos library. Route: /api/v1/photos/library-roots. Inputs: . Safe reads can use bounded retries.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Media typeapplication/json
object
library_roots
required
Array<string>
Examplegenerated
{ "library_roots": [ "example" ]}Media typeapplication/json
The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}