Skip to main content

Create a Recovery Link

POST 

/iam/recovery/link

This endpoint creates a recovery link which should be given to the user in order for them to recover (or activate) their account.

Request

Body

    expires_instring

    Link Expires In

    The recovery link will expire after that amount of time has passed. Defaults to the configuration value of selfservice.methods.code.config.lifespan.

    Possible values: Value must match regular expression ^[0-9]+(ns|us|ms|s|m|h)$

    identity_idstring<uuid>required

    Identity to Recover

    The identity's ID you wish to recover.

Responses

recoveryLinkForIdentity

Schema
    expires_atstring<date-time>

    Recovery Link Expires At

    The timestamp when the recovery link expires.

    recovery_linkstringrequired

    Recovery Link

    This link can be used to recover the account.

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://connhex.com/iam/recovery/link");
request.Headers.Add("Accept", "application/json");
var content = new StringContent("{\n \"expires_in\": \"string\",\n \"identity_id\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\"\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Request Collapse all
Body
{
  "expires_in": "string",
  "identity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}