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.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742392680a4435325.html
评论列表(0条)