
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
- Use cloudflare origin certificate instea...
Hello! Is it possible to use cloudflare origin certificates instead of let's encrypt? We manage all ssl certs in our cloudflare account and our VMs has a firewa...
- Error getting session: AppwriteException...
I get this error `Error getting session: AppwriteException: User (role: guests) missing scope (account)` when running in prod. As soon as I try running my app o...
- Unable to View / Edit Bucket Files
Hi! I am unable to view / edit Bucket Files. While Previews work just fine, clicking the actual file to view or edit it produces the errors seen in the attache...
