<@U04UQ68083H> During verification flow, when we u...
# ory-copilot
l
@chilly-king-10285 During verification flow, when we update the verification flow in the kratos with the code method, can we get the code that is being sent to the email?
c
A message from kapa.ai
No, the Ory Kratos API does not provide the verification code that is sent to the user's email during the verification flow. The code is sent directly to the user's email and is not exposed in the API response for security reasons. The user is expected to check their email and enter the code in the verification form. When you update the verification flow with the
code
method, you should not include the email field in the request body. If a code was already sent, including the email field in the payload will invalidate the sent code and re-send a new code. Here is an example of how to update the verification flow:
Copy code
json {   "method": "code",   "csrf_token": "your-csrf-token" }
In this example,
csrf_token
is the anti-CSRF token, which is only required for browser login flows. The
method
field should be set to
code
to use the code verification method. For more information, refer to the [Ory Kratos API Reference](https://www.ory.sh/docs/kratos/reference/api).