
NavidE.32705 (Customer) asked a question.
Hi,
In the serlf-serve registration there is an option to send verification email to verify email address. We need to use API for registration not(okta sef-serve) and the problem I have is:
first, I do the call to /api/v1/users?activate=false and setting password and recovery question. the response shows user is under STAGE status.
second, I do the call /api/v1/users/{uiser-id}/lifecycle/activate?sendEmail=true
By clicking the email link forward me to reset password flow! why? password is set by the first call and I just want to verify the email.
How can I do that?
thanks,
n

Hey Navid!
As you are specifying the password for the user during the user creation process, you should probably avoid sending the default activation email during the "activate" process and just allow the users to sign in with their assigned password.
If you take a look at the documentation for both the Create User and Activate User endpoints, they mention this.
"Important: Don't generate or send a one-time activation token when activating users with an assigned password. Users should login with their assigned password."
Above quote is from https://developer.okta.com/docs/reference/api/users/#create-user-with-password-recovery-question
"If a password was set before the user was activated, then user must login with with their password or the activationToken and not the activation link. More information about using the activationToken to login can be found in the Authentication API."
Above quote is from https://developer.okta.com/docs/reference/api/users/#activate-user
Rather than using Okta's default email Activation flow, you should be creating the user and then setting the "sendEmail" parameter to false when activating. You'll need to provide the user's assigned password to them separately.
Thanks,
Connor
Hey Navid,
Also, just following up on my last post, if you have further questions on the above, I'd recommend submitting an Okta support case. You can email support@okta.com or submit it through the support portal.
Thanks,
Connor