Hi guys, want to ask why when try create session for opt I pass userId and secret but still give me : Payload example:
{ "userId": "671cdc7dc67c67739e23", "secret": "582862" }
response: { message: 'Invalid token passed in the request.', code: 401, type: 'user_invalid_token', version: '1.6.0' }
My api code in next route :
.post("/verifyOtp", async (c) => { const { userId, secret } = await c.req.json(); try { const { account } = await createAdminClient(); const res = await account.createSession(userId, secret); console.log("res", res);
} catch (error) {
console.log("error", error);
return c.json({ success: false, error: error }, 400);
}
})
Recommended threads
- Bulk API limitations in self-hosted serv...
Environment: Appwrite Selfhost SDK: node-appwrite 28.0 Calling `upsertRows` (also applies to `createRows`/`updateRows`/`deleteRows`) with more than 100 rows fa...
- Self Hosted GitHub connection not adding...
After upgrading to 1.9.6 i noticed that i cannot search for new repositories when trying to add new functions. I removed the existing github connection via Set...
- Getting current user has been blocked
Getting current user has been blocked error while signing in the appwrite console. Got this during I am testing with the my saas web project. Please help to unb...