Exchange a magic-link token for an access token (passwordless login).
curl --request POST \
--url https://{subdomain}.outseta.com/api/v1/tokens/magic-linkimport requests
url = "https://{subdomain}.outseta.com/api/v1/tokens/magic-link"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://{subdomain}.outseta.com/api/v1/tokens/magic-link', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{subdomain}.outseta.com/api/v1/tokens/magic-link",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{subdomain}.outseta.com/api/v1/tokens/magic-link"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{subdomain}.outseta.com/api/v1/tokens/magic-link")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.outseta.com/api/v1/tokens/magic-link")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"access_token": "string",
"authentication_callback_url": "string",
"expires_in": 0,
"id_token": "string",
"refresh_token": "string",
"token_type": "string"
}{
"two_factor_required": false,
"two_factor_enrollment_required": false,
"challenge_token": "string",
"mechanism": "string",
"masked_destination": "string",
"expires_in": 0,
"available_mechanisms": [
"string"
],
"recovery_codes_available": false
}"string"Auth
Exchange a magic-link token for an access token (passwordless login).
Call this with the magicToken carried by the link from a “magic link” email (requested via POST /api/v1/crm/people/requestMagicLink):
{ "magic_token": "eyJ..." }
The link proves control of the email inbox, which satisfies the first factor. The response then matches POST /api/v1/tokens:
- 200 with an access token when no further factor is required;
- 202 with a two_factor_required challenge when the user has a non-email second factor (e.g. an authenticator app) that must still be cleared via POST /api/v1/tokens/two-factor. Email is never offered as that second factor — it was already the first.
An invalid, expired, already-used token (or a tenant without magic-link login enabled) returns 400 (invalid_grant).
POST
/
api
/
v1
/
tokens
/
magic-link
Exchange a magic-link token for an access token (passwordless login).
curl --request POST \
--url https://{subdomain}.outseta.com/api/v1/tokens/magic-linkimport requests
url = "https://{subdomain}.outseta.com/api/v1/tokens/magic-link"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://{subdomain}.outseta.com/api/v1/tokens/magic-link', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{subdomain}.outseta.com/api/v1/tokens/magic-link",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{subdomain}.outseta.com/api/v1/tokens/magic-link"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{subdomain}.outseta.com/api/v1/tokens/magic-link")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.outseta.com/api/v1/tokens/magic-link")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"access_token": "string",
"authentication_callback_url": "string",
"expires_in": 0,
"id_token": "string",
"refresh_token": "string",
"token_type": "string"
}{
"two_factor_required": false,
"two_factor_enrollment_required": false,
"challenge_token": "string",
"mechanism": "string",
"masked_destination": "string",
"expires_in": 0,
"available_mechanisms": [
"string"
],
"recovery_codes_available": false
}"string"