Hi, I’m looking at the email verification feature ...
# talk-kratos
a
Hi, I’m looking at the email verification feature (self-hosted). Clicking on the email link works fine, but is there any way to set the email address to verified state by an admin? I tried to trigger new verification flows on the backend, but couldn’t complete them. Both browser and native. Either got errors or just nothing happened. (Sometimes email got sent again, but that’s not what I wanted} Do you have any suggestions ot this?
One of the most frequent errors:
4070001 The verification token is invalid or has already been used. Please retry the flow
This happens when I’m calling
self-service/verification?flow=…&token=…
with the email and method in the request body. Also tried to add the csrfToken to the request body.
w
you should be able to patch an identity with a verified address using the admin api
p
how does one get a token for the admin api?
docs are not very clear about this, or I missed it 😓
e
The admin API doesn't require a token
a
Thanks for the suggestion! Yes, the admin API doesn't require a token, but I don't think it's possible to patch the verifable email addresses. Or could anyone do that?
@white-greece-76805 Follow up on this: it’s working! 🥳 I remembered that I could not patch the email value, but you were right, it’s possible to patch just the verified status. Who would have thought that 😄 thanks again!
w
you're welcome, I'm happy to hear that my suggestion was helpful
b
@able-dream-62808 do you remember the command you ran? I am trying to do something similar but I am not able to update to verfiied, ref https://ory-community.slack.com/archives/C02MR4DEEGH/p1684143350852629 🙂