
Error:
Error 404 The requested route was not found. Please refer to the API docs and try again.
Type
general_route_not_found
Details:
"dependencies": {
"cors": "^2.8.5",
"express": "^4.18.3",
"node-appwrite": "^12.0.0"
}
code:
const token = await users.createToken("3423FFR23R23R2R3");
const endPoint = "https://cloud.appwrite.io/v1"; // my endpoint
Description: i am getting "general_route_not_found" when i use createToken at node js side. i can able to perfoem other methods like create etc. but when i use "createToke " getting this error please let me know if anyone have solution.
I appreciate any help you can provide.

general_route_not_found

general_route_not_found (NODE JS)

Could you share your code?

Yes wait

Make sure to not send any API keys or sensitive info.

// index.js ( main file) this the end points where i sending request to create a token `app.post("/test-auth", async (req, res) => { console.log("req.body: ", req.body); try { const token = await users.createToken("3423FFR23R23R2R3"); const secret = token.secret;
res.json({ token: secret });
} catch (error) { console.log("err: ", error); res.json({ err: error.response, }); } });`
// setup.js
`import sdk from "node-appwrite";
const endPoint = "https://cloud.appwrite.io/v1"; const projectID = "PROJECT_ID"; const apiKey = "API_KEY;
const client = new sdk.Client() .setEndpoint(endPoint) // Your API Endpoint .setProject(projectID) // Your project ID .setKey(apiKey) // Your secret API key .setSelfSigned();
export let users = new sdk.Users(client);
export default client;`

@Faye here's the code.

Use 3 backticks like markdown next time and put your code in that, so it looks like this: 3 at top
code
3 at bottom

why do you have .setselfsigned()?

https://github.com/appwrite/sdk-for-node/blob/main/README.md
In this docs they mention
.setSelfSigned() // Use only on dev mode with a self-signed SSL cert

Thanks will keep this in mind 🙂
Recommended threads
- android kotlin error updatePhone
package vasu.apps.schooldashboard.Services import android.util.Log import io.appwrite.Client import io.appwrite.ID import io.appwrite.exceptions.AppwriteExcept...
- Cannot create a user
Hi, I am using a lowcoder frontend and trying to create a user in Appwrite (python function). Unfortunately, all I got is an error: "Raw body: Error". It means...
- React native app login via Safari
Hi! I deployed for debug my React Native app in web, chrome everythink works well but in safari on mac and ios I cant login. I found this one error in safari co...
