# How to confirm the registration and set initial Password

**URL:** <https://community.dreamfactory.com/t/how-to-confirm-the-registration-and-set-initial-password/3163>\
**Category:** Authentication & Security\
**Created:** [August 25, 2016, 9:25am UTC](https://community.dreamfactory.com/t/how-to-confirm-the-registration-and-set-initial-password/3163 "2016-08-25T09:25:11Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Julian\_Kallidat](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/julian_kallidat/32/1213_2.png) [@Julian\_Kallidat](https://community.dreamfactory.com/u/Julian_Kallidat)\
**Post date:** [August 25, 2016, 9:25am UTC](https://community.dreamfactory.com/t/how-to-confirm-the-registration-and-set-initial-password/3163/1 "2016-08-25T09:25:11Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![DFCommunityManager](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/dfcommunitymanager/32/887_2.png) [@DFCommunityManager](https://community.dreamfactory.com/u/DFCommunityManager)\
**Post date:** [August 25, 2016, 1:44pm UTC](https://community.dreamfactory.com/t/how-to-confirm-the-registration-and-set-initial-password/3163/2 "2016-08-25T13:44:14Z")

</div>

Hey @Julian_Kallidat,

Have you checked out our Wiki on Open Registration?

- [https://wiki.dreamfactory.com/DreamFactory/Tutorials/Open\_Registration](https://wiki.dreamfactory.com/DreamFactory/Tutorials/Open_Registration)

Thanks,  
@AlexBowen

---

<div class="post-metadata">

**Author:** ![Julian\_Kallidat](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/julian_kallidat/32/1213_2.png) [@Julian\_Kallidat](https://community.dreamfactory.com/u/Julian_Kallidat)\
**Post date:** [August 25, 2016, 3:10pm UTC](https://community.dreamfactory.com/t/how-to-confirm-the-registration-and-set-initial-password/3163/3 "2016-08-25T15:10:40Z")

</div>

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:

> [@What's wrong with my user registration & confirmation](https://community.dreamfactory.com/t/whats-wrong-with-my-user-registration-confirmation/2722):
>
> hi all i need to understand the user CONFIRMATION I use open registation with email so to do a user creation : i do a POST to /api/v2/user/register with ‘email’: email, “first\_name”: fistname, “last\_name”: nom, the user receive en Email with confirmation code no problem here. and now i want to confirm without the dsp confirmation page so i build a page who do a post to /api/v2/user/register with ‘email’: email, “code”:code, “new\_password”:password and i got an error that tell…

Will try this later and report back.

---

<div class="post-metadata">

**Author:** ![DFCommunityManager](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/dfcommunitymanager/32/887_2.png) [@DFCommunityManager](https://community.dreamfactory.com/u/DFCommunityManager)\
**Post date:** [August 25, 2016, 3:40pm UTC](https://community.dreamfactory.com/t/how-to-confirm-the-registration-and-set-initial-password/3163/4 "2016-08-25T15:40:07Z")

</div>

Great! Thanks for testing everything out 🙂

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

Thanks,  
@AlexBowen

---

<div class="post-metadata">

**Author:** ![Julian\_Kallidat](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/julian_kallidat/32/1213_2.png) [@Julian\_Kallidat](https://community.dreamfactory.com/u/Julian_Kallidat)\
**Post date:** [August 26, 2016, 8:27am UTC](https://community.dreamfactory.com/t/how-to-confirm-the-registration-and-set-initial-password/3163/5 "2016-08-26T08:27:31Z")

</div>

☹ 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.
}
```

---

<div class="post-metadata">

**Author:** ![Julian\_Kallidat](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/julian_kallidat/32/1213_2.png) [@Julian\_Kallidat](https://community.dreamfactory.com/u/Julian_Kallidat)\
**Post date:** [August 29, 2016, 2:42pm UTC](https://community.dreamfactory.com/t/how-to-confirm-the-registration-and-set-initial-password/3163/6 "2016-08-29T14:42:29Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![DFCommunityManager](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/dfcommunitymanager/32/887_2.png) [@DFCommunityManager](https://community.dreamfactory.com/u/DFCommunityManager)\
**Post date:** [September 1, 2016, 2:44pm UTC](https://community.dreamfactory.com/t/how-to-confirm-the-registration-and-set-initial-password/3163/7 "2016-09-01T14:44:29Z")

</div>

Awesome! Thanks @Julian_Kallidat for the update 🙂

- @AlexBowen
