Javascript Reference v2.0

Retrieve a bucket

Retrieves the details of an existing Storage bucket.

  • RLS policy permissions required:
    • buckets table permissions: select
    • objects table permissions: none
  • Refer to the Storage guide on how access control works
Parameters
    id
    REQUIRED
    string

    The unique identifier of the bucket you would like to retrieve.


const { data, error } = await supabase
  .storage
  .getBucket('avatars')