---
title: "NUXT_CONVEX_R0004: Better Auth token request failed"
description: "The server asked Better Auth for the request's Convex token and got an error status other than 401 or 403. The page renders anonymously."
canonical_url: "https://nuxt-convex.onmax.me/errors/nuxt-convex-r0004"
---
# NUXT_CONVEX_R0004: Better Auth token request failed

> The server asked Better Auth for the request's Convex token and got an error status other than 401 or 403. The page renders anonymously.

Code: `NUXT_CONVEX_R0004`<br />


Level: warning<br />


Package: `nuxt-convex`

## What this error means

The server asked Better Auth for the request's Convex token and got an error status other than 401 or 403. The page renders anonymously.

## Why this happens

- `@convex-dev/better-auth` is not set up in the Convex deployment.
- `BETTER_AUTH_SECRET` changed and Better Auth can no longer decrypt its keys (see [Troubleshooting](https://nuxt-convex.onmax.me/troubleshooting#failed-to-decrypt-private-key)).
- `convex.auth.basePath` doesn't match the Better Auth base path.

## How to fix it

Request `/convex/token` under your configured `convex.auth.basePath` in the browser while signed in. With the default base path, that's `/api/auth/convex/token`; with `/auth/`, it's `/auth/convex/token`. It should return `{ "token": "..." }`. If it fails, fix the Better Auth setup in your Convex deployment. See [Better Auth](https://nuxt-convex.onmax.me/integrations/better-auth).


## Sitemap

See the full [sitemap](https://nuxt-convex.onmax.me/sitemap.md) for all pages.
