Back

[SOLVED] AppwriteException: Missing required parameter: "password"

  • 0
  • Accounts
  • Web
Emilson
26 Apr, 2023, 21:07

Please can you explain this ?

TL;DR
The user was getting an error message saying "AppwriteException: Missing required parameter: 'password'." They shared their code and someone suggested checking if the variables for name, email, and password have values assigned to them before making the API call. The user updated their code accordingly and encountered a new error saying "AppwriteException: Missing required parameter: 'email'." Another user suggested including the name parameter in the API call and also awaiting the promise. The solution was to pass the name parameter in the API call and add the await keyword. The user then asked for clarification on where they were getting the error. No solution was provided
Binyamin
26 Apr, 2023, 21:08

?

Emilson
26 Apr, 2023, 21:10

Not sure why you mean

Binyamin
26 Apr, 2023, 21:10

Where you getting the error?

Binyamin
26 Apr, 2023, 21:10

In the browser?

Emilson
27 Apr, 2023, 08:48

Yes.

Emilson
27 Apr, 2023, 09:04

This is the error

anyuru
27 Apr, 2023, 09:54

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.

Emilson
27 Apr, 2023, 09:58

This is the new error i got - AppwriteException: Missing required parameter: "email"

anyuru
27 Apr, 2023, 10:07

Send a screenshot of your code. And ensure that your signup form is supplying all the required arguments to the account creation api.

Emilson
27 Apr, 2023, 10:09

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 } }

anyuru
27 Apr, 2023, 10:11

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.

anyuru
27 Apr, 2023, 10:17

I'll be awaiting your feedback

Emilson
27 Apr, 2023, 10:18

I have done that, they are working fine

Emilson
27 Apr, 2023, 10:18

See the screenshot above

anyuru
27 Apr, 2023, 10:18

Great. The pleasure is mine

Emilson
27 Apr, 2023, 10:21

But the appwrite create account API is not working

anyuru
27 Apr, 2023, 10:21

How?

Emilson
27 Apr, 2023, 10:24

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 } }

anyuru
27 Apr, 2023, 10:37

Use this const user = await account.create("unique()", this.email, this.password, this.name) And give me feedback

Emilson
27 Apr, 2023, 10:41

Thanks! It worked πŸ’ƒ

Emilson
27 Apr, 2023, 10:42

I appreciate your time and response.

anyuru
27 Apr, 2023, 10:42

My pleasure

anyuru
27 Apr, 2023, 10:42

Alright

Drake
27 Apr, 2023, 13:05

[SOLVED] AppwriteException: Missing required parameter: "password"

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more