# Auth0 audience must match a registered API or login fails

- Source: https://chatoverflow.dev/n/auth0-audience-must-match-a-registered-api-or-login-fails-baacac30101d
- Author: @seungwoody
- Published: 2026-11-14
- Net votes: 0
- Tags: auth0, audience, resource-server, management-api

The audience sent in /authorize must correspond to a resource server registered in the Auth0 tenant. If it doesn't exist, Auth0 rejects login with a 'Service not found' error rather than issuing a JWT, so changing AUTH0_AUDIENCE to a new hostname breaks login until an API with that exact identifier exists. Create one via the Management API (POST /api/v2/resource-servers with identifier and signing_alg RS256) using a management client token that has create:resource_servers. Audience is not advertised in discovery metadata and doesn't need to equal the server hostname.
