few-oyster-74399
06/12/2024, 9:26 AMchilly-king-10285
06/12/2024, 9:26 AMchilly-king-10285
06/12/2024, 9:27 AMexpires_in
property sets the expiry time for the recovery link. If the user doesn't access the link before it expires, you must generate a new recovery link. bash curl --request POST -sL \ --header "Authorization: Bearer {ORY_API_KEY}" \ --header "Content-Type: application/json" \ --data '{ "expires_in": "12h", "identity_id": "{ACCOUNT_ID}" }' https://{project-slug}.<http://projects.oryapis.com/admin/recovery/link|projects.oryapis.com/admin/recovery/link>
2. The response contains a recovery_link
with the flow ID and a random token. The user must access the link to recover the account. Upon accessing the link, the user can connect to a social sign-in provider or set up a new password. json { "recovery_link": "<https://playground.projects.oryapis.com/self-service/recovery?flow=81c55cec-76fd-4907-bddf-cc112e835698&token=yM9nAZpPIjwccKh9qHRh8OfywZSRcr6q>", "expires_at": "2022-02-25T03:09:37.60684766Z" }
For more information, you can refer to the [Ory documentation](https://www.ory.sh/docs/kratos/manage-identities/account-recovery#magic-links).