---
title: "serverSupabaseServiceRole"
description: "Make requests with super admin rights to the Supabase API with the serverSupabaseServiceRole service"
canonical_url: "https://supabase.nuxtjs.org/services/serversupabaseservicerole"
---
# serverSupabaseServiceRole

> Make requests with super admin rights to the Supabase API with the serverSupabaseServiceRole service

<warning>

This section assumes you're familiar with [Nitro](https://v3.nuxtjs.org/guide/concepts/server-engine), the server engine powered by Nuxt.

</warning>

This function is designed to work only in [server routes](https://nuxt.com/docs/guide/directory-structure/server#server-routes), there is no vue composable equivalent.

It works similary as the [serverSupabaseClient](https://supabase.nuxtjs.org/services/serversupabaseclient) but it provides a client with super admin rights that can bypass your [Row Level Security](https://supabase.com/docs/guides/auth/row-level-security).

> The client is initialized with the `NUXT_SUPABASE_SECRET_KEY` you must have in your `.env` file. See the [Supabase blog post](https://supabase.com/blog/jwt-signing-keys) for more on JWT signing keys.

Define your server route and just import the `serverSupabaseServiceRole` from `#supabase/server`.

```ts [server/api/bypass-rls.ts]
import { serverSupabaseServiceRole } from '#supabase/server'

export default eventHandler(async (event) => {
  const client = serverSupabaseServiceRole(event)

  const { data } = await client.from('rls-protected-table').select()

  return { sensitiveData: data }
})
```

Then call your API route from any vue file:

```ts [pages/index.vue]
const fetchSensitiveData = async () => {
  const { sensitiveData } = await useFetch('/api/bypass-rls')
}
```


## Sitemap

See the full [sitemap](https://supabase.nuxtjs.org/sitemap.md) for all pages.
