Update User Email
Hello,
For v1 there is an API :
PUT:
https://$CUSTOM-DOMAIN/management/v1/users/:userId/email
https://zitadel.com/docs/apis/resources/mgmt/management-service-update-human-email
This allows you to verify the email address without passing in the code, and also allows you to pass in the same email address.
Although this is deprecated.
In my scenario , the user receives an Organization invite link and once he accepts the invite I would like the user's email to be verified instead of triggering another email with email verification code , since the invite email was accepted which by default should make sense to have the email verified.
For v2...
POST:
https://$CUSTOM-DOMAIN/v2/users/:userId/email
https://zitadel.com/docs/apis/resources/user_service_v2/user-service-set-email
With respect to my use case, if I just want to make the user email verfieid this endpoint does not let me do that as it expects the email to be updated.
For example , if I pass in the same email and isVerified: true, it throws error:
Is there a way to verify the user email address without using the verification code?
ZITADEL Docs
Change the email address of a user. If the state is set to not verified, the user will get a verification email.
ZITADEL Docs
Change the email address of a user. If the state is set to not verified, a verification code will be generated, which can be either returned or sent to the user by email..
8 Replies
when you create a user in the v2 api, the user should get a verificaiton email and be able to verify the user itself.
is that not a possiblity you can use?
@fabienne , no the use case is bit different here.
We are sending the user an invite to be part of the organization along with the password reset code, which when he accepts we let him set the password and signin.
So currently we need to depend on two emails, first for the user invitation and second for the email verification.
Also our use case says that since the user already accepted the invite triggered over his email and setup his password , that means he is the owner of the email and should not need to verify the email seperately
with v1, I can acheive this by just setting the to true although the email can be the same as existing one
but with v2, it required the email to be a different one from the existing one
Can you suggest a possibility / workaround
we are currently working on the invite user link, would that solve your problem? https://github.com/zitadel/zitadel/issues/8310
GitHub
Invite User Link · Issue #8310 · zitadel/zitadel
As an administrator I want to be able to invite users to my application with the API V2, some user data I will already prefill, the user should add the authentication method itself (password, passk...
if this invite user API allows to reset password and also verifies the user then this can be a possible option.
But for now is there a way with v2 to verify the user email without depending on the verification code?
We are okay to use the admin token @fabienne
Did you do the set user email with an administrator? if so then i would say that there is no possiblity at the moment
@fabienne , I created a new user using /v2/users/human using a Iam Owner user token
Do you mean there is no possible way in v2 to mark the user as verified without using verification code?
yes from what i can tell i think it is currently not possible to set email verified without the verification code
Unknown User•12mo ago
Message Not Public
Sign In & Join Server To View