To list all collections for a user, call the GET /collections API.
curl -i -X GET "https://api.box.com/2.0/collections" \ -H "authorization: Bearer <ACCESS_TOKEN>"
await client.collections.getCollections();
client.collections.get_collections()
await client.Collections.GetCollectionsAsync();
try await client.collections.getCollections()
Iterable<BoxCollection.Info> collections = BoxCollection.getAllCollections(api);for (BoxCollection.Info collectionInfo : collections) { // Do something with the collection.}
collections = client.collections()for collection in collections: print(f'Collection "{collection.name}" has ID {collection.id}')
The only collection that is available via the API is the “Favorites”
collection. The ID of this collection is different for every
user.
Favorites Collection
The only collection that items can currently be added and removed to via the
API is the “Favorites” collection.The ID of the favorites collection is different for every user. To find the
user’s collection ID for their favorites, list all the user’s collections and
then find the collection with a collection_type of favorites.