---
id: storage-listbuckets
title: "listBuckets()"
slug: storage-listbuckets
custom_edit_url: https://github.com/supabase/supabase/edit/master/web/spec/supabase.yml
---

import Tabs from '@theme/Tabs';
import TabsPanel from '@theme/TabsPanel';

Retrieves the details of all Storage buckets within an existing product.

<Tabs
  defaultActiveId="js"
  groupId="reference/supabase-js"
  values={[{ label: 'JavaScript', value: 'js' }]}>

<TabsPanel id="js" label="js">

```js
const { data, error } = await supabase
  .storage
  .listBuckets()
```


</TabsPanel>

</Tabs>





## Notes

- Policy permissions required:
  - `buckets` permissions: `select` 
  - `objects` permissions: none










## Examples

### List buckets



<Tabs
  defaultActiveId="js"
  groupId="reference/supabase-js"
  values={[{ label: 'JavaScript', value: 'js' }]}>

<TabsPanel id="js" label="js">

```js
const { data, error } = await supabase
  .storage
  .listBuckets()
```


</TabsPanel>

</Tabs>