Earlier I didn't find this error while sending a request. Can you help me with this error
import { Client, Account, ID } from "appwrite";
import config from "../conf/config";
const client = new Client();
const account = new Account(client);
client.setEndpoint(config.appwriteURL).setProject(config.appwriteProjectID);
export class authService{
async signup(name, email, password){
try {
await account.create(ID.unique(), name, email, password);
return true
} catch (error) {
console.log(error)
return false
}
}
}
const authServices = new authService();
export default authServices;
I dont think the order of parameters for the account.create() call is correct. Name should go last.
Btw, it's best to use 3 back ticks with multi-line code. See https://www.markdownguide.org/extended-syntax/#syntax-highlighting
Recommended threads
- Send Email Verification With REST
I am using REST to create a user on the server side after receiving form data from the client. After the account is successfully created i wanted to send the v...
- Use different email hosts for different ...
Hello, I have 2 projects and i want to be able to set up email templates in the projects. Both projects will have different email host configurations. I see ...
- Get team fail in appwrite function
I try to get team of a user inside appwrite function, but i get this error: `AppwriteException: User (role: guests) missing scope (teams.read)` If i try on cl...