How to confirm the registration and set initial Password


#1

Hello there,

I am implementing open registration. Now the user gets the code.
Want to use my own ConfirmationForm.
I posted to… /api/v2/user/register?login=false
{
“email”: "name@provider.com",
“new_password”: “Password”,
“code”: “codefromMail
}

Response

{
  "error": {
    "context": {
      "email": [
        "The email has already been taken."
      ]
    },
    "message": "Validation failed",
    "code": 400
  }
}

What am I missing?


#2

Hey @Julian_Kallidat,

Have you checked out our Wiki on Open Registration?

Thanks,
@AlexBowen


#3

Hi Alex,

Yes I found this Wiki Entry allready, as far as that Information goes, everything works fine.
But now I have my Code and don’t know what to do with it.
I also read several old Community Post, but they didn’t work.

I just intended to link the post I read earlier, didn’t find them, but found this:

Will try this later and report back.


#4

Great! Thanks for testing everything out :slight_smile:

Let me know how that works for you. I will continue to look into it in the meantime.

Thanks,
@AlexBowen


#5

:frowning: no doesn’t work. Bad Request. No wonder since the model looks like this:

Register {
   email (string): Email address of the new user. ,
   first_name (string, optional): First name of the new user. ,
   last_name (string, optional): Last name of the new user. ,
   display_name (string, optional): Full display name of the new user. ,
   new_password (string, optional): Password for the new user. ,
code (string, optional): Code required with new_password when using email confirmation.
}

#6

Soo after updating DF to 2.2.3 posting the following rescource to

[INSTANCE]/api/v2/user/password

does the job:

{
    'email': "theem@il.user",
    'code': "CODE FROM MAIL",
    'new_password': "PWD",
    'verify_password': "PWD"
}

#7

Awesome! Thanks @Julian_Kallidat for the update :slight_smile:

  • @AlexBowen