API endpoint to send activation email without activating the user


Not sure if it is a bug or a bad design but at the moment the endpoint /api/v1/users/{userId}/lifecycle/activate?sendEmail=true is activating the user beforehand making the activation email useless

I can see 2 options

  1. Create another endpoint just to send the activation email without activating the user.

  2. Create a new state in users, so you can’t login when user is active but not verified, being verified the final state of the user when they can do everything

yeah, I have the same issue

Any suggestions or any help here, Thanks?

OK, so apparently the issue here is that I am setting the password at the registration, if I remove the password the activate endpoint does not activate the user.

That will force us to create another page asking the user to set its password

My observation of the behaviour is:

  1. Create user with activate=false results in state “Staged”.
  2. Clicking activate in the dashboard (presumably the same as calling the /activate endpoint) results in state “Pending user action”.
  3. The user clicking the activation link in the e-mail results in state “Active”.

So it appears that your option 2 is already the case? This is only from observation on the dashboard and interacting with some of the API, so apologies if I’ve missed a subtlety of your issue :slight_smile:

The dashboard and the apis behave in a different way
Using apis:

1 create user without password and activate=false
2 call /activate and it will send the activation email and the user will be staged
3 call /token to verify the activation token and get the new state token, the user will be user pending action
4 call /reset_password with the newPassword and new stateToken and it will set the user active