Fetching user by jwt as admin.

In the docs, an example for Fetch the user object using the access_token jwt. is the same as the code example for Get user by id..
const { data, error } = await supabase.auth.admin.getUserById(1)

I tried this with a valid token but get an error "user_id must be an UUID". I'm assuming this line of code got copied over without being fixed, how can I get the user calling the edge function? (context: this is being used in an edge function)

I also tried
const { data: { user } } = await supabase.auth.getUser(jwt)

but get { data: { user: null }, error: AuthApiError { name: "AuthApiError", message: "Internal server error", status: 500 } } back.
Was this page helpful?