Hello, when I try to generate TypeScript types using the CLI (
npx supabase gen types typescript --project-id "PROJECT_ID" --schema public > src/types/database.types.ts
npx supabase gen types typescript --project-id "PROJECT_ID" --schema public > src/types/database.types.ts
) or in the
API Docs > Instruction > Generate and download types
API Docs > Instruction > Generate and download types
it throws the following error:
failed to retrieve generated types: {"message":"{\"message\":\"Legacy API keys are disabled\",\"hint\":\"Your legacy API keys (anon, service_role) were disabled on 2025-07-31T14:41:06.927252+00:00. Re-enable them in the Supabase dashboard, or use the new publishable and secret API keys.\"}"}Try rerunning the command with --debug to troubleshoot the error.
failed to retrieve generated types: {"message":"{\"message\":\"Legacy API keys are disabled\",\"hint\":\"Your legacy API keys (anon, service_role) were disabled on 2025-07-31T14:41:06.927252+00:00. Re-enable them in the Supabase dashboard, or use the new publishable and secret API keys.\"}"}Try rerunning the command with --debug to troubleshoot the error.
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.