Confirming New User

From DreamFactory
Jump to: navigation, search
DreamFactoryTutorialsConfirming New User

When a new user is created, the system can send them an invite email that contains a confirmation URL and confirmation code. When they click the link in the email, a form is presented that requests the following info in order to confirm them as a new user. DreamFactory normally handles all of this for you, but you can use the API below to implement the same functionality in your own app.

Note: As of DreamFactory 2.3.1, the confirmation code expires in 24 hours by default. You can configure this expiry period by changing (and uncommenting) the environment flag DF_CONFIRM_CODE_TTL in the .env file. Please keep in mind that this also affects the password reset confirmation period. The confirmation code itself is alphanumeric and the length of the confirmation code is also configurable. By default it is set to 32 characters long. You can change this by changing (and uncommenting) the environment flag DF_CONFIRM_CODE_LENGTH in the .env file. Again, this also affects the password reset confirmation code's length.

API Endpoint

POST https://{url}/api/v2/user/password

Request body:

{
  "code": "confirm_code"
  "email": "user_email",
  "new_password": "password",
  "verify_password": "password"
}

Example - Confirming New User

  • Request body:
{
  "code": "abc123"
  "email": "[email protected]",
  "new_password": "secret",
  "verify_password": "secret"
}
  • Request URL:
POST https://foo.com/api/v2/user/password