Rank 2: Process
Please can you explain this ?
Votes
0
Replies
24
Participants
Unknown
Messages
25
Rank 2: Process
Please can you explain this ?
?
Rank 2: Process
Not sure why you mean
Where you getting the error?
In the browser?
Rank 2: Process
Yes.
Rank 2: Process
This is the error
Rank 2: Process
Yeah that's right there is a missing parameter. When you are registering. It takes in the of the user registering it takes in four parameters that is the uniqueId, email, password and name. Therefore this implies that as you are calling the create method of the account api, you should pass in the name as follows:
const user = await account.create("unique()", email, password, "").
And just to handle the promise on addition to that I added an await.
This should get it done.
I'll be awaiting any feedback.
Rank 2: Process
This is the new error i got - AppwriteException: Missing required parameter: "email"
Rank 2: Process
Send a screenshot of your code. And ensure that your signup form is supplying all the required arguments to the account creation api.
Rank 2: Process
This is a copy of the updated code
async sendEmail(name, email, password) {
try {
const user = await account.create('unique()', email, password, "");
console.log(user); // Success
} catch (error) {
console.log(error); // Failure
}
}
Rank 2: Process
Before making the create call to the account api could you please log to the console each of those values like the name, email and password and verify that they have values assigned to them.
Rank 2: Process
I'll be awaiting your feedback
Rank 2: Process
I have done that, they are working fine
Rank 2: Process
See the screenshot above
Rank 2: Process
Great. The pleasure is mine
Rank 2: Process
But the appwrite create account API is not working
Rank 2: Process
How?
Rank 2: Process
This was what i did
async sendEmail() {
try {
// const user = await account.create("unique()", email, password, "");
console.log('Name:', this.name)
console.log('Password:', this.password)
console.log('Email:', this.email)
} catch (error) {
console.log(error); // Failure
}
}
Rank 2: Process
Use this
const user = await account.create("unique()", this.email, this.password, this.name)
And give me feedback
Rank 2: Process
Thanks! It worked 💃
Rank 2: Process
I appreciate your time and response.
Rank 2: Process
My pleasure
Rank 2: Process
Alright
Admin
[SOLVED] AppwriteException: Missing required parameter: "password"