ListUsers() : AuthApiError 401 ?

hi guys
export async function getUsers() {
  const cookieStore = cookies();
  const supabase = await createClient(cookieStore);
  const result = await supabase.auth.admin.listUsers();
  return result;
}

i get this error when calling my server action AuthApiError: User not allowed status:401
any help ?
Was this page helpful?