Create Recovery Flow for Browsers
GET {{baseUrl}}/self-service/recovery/browser?return_to=<string>
This endpoint initializes a browser-based account recovery flow. Once initialized, the browser will be redirected to
selfservice.flows.recovery.ui_url
with the flow ID set as the query parameter ?flow=
. If a valid user session
exists, the browser is returned to the configured return URL.
If this endpoint is called via an AJAX request, the response contains the recovery flow without any redirects or a 400 bad request error if the user is already authenticated.
This endpoint is NOT INTENDED for clients that do not have a browser (Chrome, Firefox, ...) as cookies are needed.
More information can be found at Ory Kratos Account Recovery Documentation.
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
return_to | string | The URL to return the browser to after the flow was completed. |
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Accept | string |
RESPONSES
status: OK
{"id":"\u003cuuid\u003e","type":"\u003cstring\u003e","expires_at":"\u003cdateTime\u003e","issued_at":"\u003cdateTime\u003e","request_url":"\u003cstring\u003e","ui":{"action":"\u003cstring\u003e","method":"\u003cstring\u003e","nodes":[{"type":"a","group":"code","attributes":{"name":"\u003cstring\u003e","type":"datetime-local","disabled":"\u003cboolean\u003e","node_type":"img","autocomplete":"one-time-code","label":{"id":"\u003clong\u003e","text":"\u003cstring\u003e","type":"success","context":{}},"onclick":"\u003cstring\u003e","onload":"\u003cstring\u003e","pattern":"\u003cstring\u003e","required":"\u003cboolean\u003e","value":{"description":"The input's value.","nullable":true}},"messages":[{"id":"\u003clong\u003e","text":"\u003cstring\u003e","type":"info","context":{}},{"id":"\u003clong\u003e","text":"\u003cstring\u003e","type":"error","context":{}}],"meta":{"label":{"id":"\u003clong\u003e","text":"\u003cstring\u003e","type":"info","context":{}}}},{"type":"input","group":"link","attributes":{"name":"\u003cstring\u003e","type":"submit","disabled":"\u003cboolean\u003e","node_type":"input","autocomplete":"one-time-code","label":{"id":"\u003clong\u003e","text":"\u003cstring\u003e","type":"error","context":{}},"onclick":"\u003cstring\u003e","onload":"\u003cstring\u003e","pattern":"\u003cstring\u003e","required":"\u003cboolean\u003e","value":{"description":"The input's value.","nullable":true}},"messages":[{"id":"\u003clong\u003e","text":"\u003cstring\u003e","type":"success","context":{}},{"id":"\u003clong\u003e","text":"\u003cstring\u003e","type":"info","context":{}}],"meta":{"label":{"id":"\u003clong\u003e","text":"\u003cstring\u003e","type":"success","context":{}}}}],"messages":[{"id":"\u003clong\u003e","text":"\u003cstring\u003e","type":"error","context":{}},{"id":"\u003clong\u003e","text":"\u003cstring\u003e","type":"info","context":{}}]},"state":{"description":"State represents the state of this request:\n\nchoose_method: ask the user to choose a method (e.g. recover account via email)\nsent_email: the email has been sent to the user\npassed_challenge: the request was successful and the recovery challenge was passed."},"active":"\u003cstring\u003e","continue_with":[{"action":"show_verification_ui","flow":{"id":"\u003cuuid\u003e","verifiable_address":"\u003cstring\u003e","url":"\u003cstring\u003e"}},{"action":"show_verification_ui","flow":{"id":"\u003cuuid\u003e","verifiable_address":"\u003cstring\u003e","url":"\u003cstring\u003e"}}],"return_to":"\u003cstring\u003e","transient_payload":{}}