Create a magic link to log in a user
POSThttps://app.phasetwo.io/realms/:realm/magic-link
Create a magic link to log in a user
Request
Path Parameters
realm stringrequired
realm name (not id!)
- application/json
Bodyrequired
JSON body
emailstringrequired
client_idstringrequired
redirect_uristringrequired
expiration_secondsinteger
force_createboolean
send_emailboolean
Responses
- 200
- 400
- 404
Magic Link created
Malformed request
User or Client not found
Authorization: http
name: access_tokentype: httpscheme: bearerbearerFormat:
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://app.phasetwo.io/realms/:realm/magic-link");
request.Headers.Add("Authorization", "Bearer <token>");
var content = new StringContent("{\n \"email\": \"string\",\n \"client_id\": \"string\",\n \"redirect_uri\": \"string\",\n \"expiration_seconds\": 0,\n \"force_create\": true,\n \"send_email\": true\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
ResponseClear