admin管理员组

文章数量:1336088

I am trying to use the Appwrite Cloud API in my Next.js project, but I keep encountering the following error: { "message": "The requested route was not found. Please refer to the API docs and try again.", "code": 404, "type": "general_route_not_found", "version": "1.6.0" }

What I am using:

Endpoint: 

Appwrite Version: 1.6.0

Environment Variables:
    NEXT_PUBLIC_APPWRITE_ENDPOINT: 
    NEXT_PUBLIC_APPWRITE_PROJECT_ID: my_project_id

Code Example: Here’s how I’m initializing the Appwrite client:

import { Client } from 'appwrite';

const client = new Client(); client .setEndpoint(process.env.NEXT_PUBLIC_APPWRITE_ENDPOINT) // .setProject(process.env.NEXT_PUBLIC_APPWRITE_PROJECT_ID); // my_project_id

Dependencies:

[email protected]
[email protected]
[email protected]
[email protected]

Verified the endpoint and project ID in the Appwrite dashboard. Printed the environment variables to confirm they are being loaded correctly. Tested the API directly using Postman: The same 404 error occurs. Checked my Appwrite Cloud project settings and ensured the API key has the necessary permissions. Reviewed the Appwrite API documentation for the correct endpoints.

本文标签: nodejsAppwrite Cloud API returns 39Route Not Found39 (404) on valid endpointStack Overflow