Report whether the user associatd to a Stytch OAuth or Magic Links token has been fully registered on Narrative side
curl --request POST \
--url https://api-dev.narrative.io/authentication/registration-status \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"stytch_token": {
"token_type": "magiclinks",
"token": "cykuz7f22h7rx5SPomBZUB359jj6GA-4NUBkuZDiduun"
},
"session_duration_minutes": 5
}
'import requests
url = "https://api-dev.narrative.io/authentication/registration-status"
payload = {
"stytch_token": {
"token_type": "magiclinks",
"token": "cykuz7f22h7rx5SPomBZUB359jj6GA-4NUBkuZDiduun"
},
"session_duration_minutes": 5
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
stytch_token: {
token_type: 'magiclinks',
token: 'cykuz7f22h7rx5SPomBZUB359jj6GA-4NUBkuZDiduun'
},
session_duration_minutes: 5
})
};
fetch('https://api-dev.narrative.io/authentication/registration-status', 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://api-dev.narrative.io/authentication/registration-status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'stytch_token' => [
'token_type' => 'magiclinks',
'token' => 'cykuz7f22h7rx5SPomBZUB359jj6GA-4NUBkuZDiduun'
],
'session_duration_minutes' => 5
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-dev.narrative.io/authentication/registration-status"
payload := strings.NewReader("{\n \"stytch_token\": {\n \"token_type\": \"magiclinks\",\n \"token\": \"cykuz7f22h7rx5SPomBZUB359jj6GA-4NUBkuZDiduun\"\n },\n \"session_duration_minutes\": 5\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-dev.narrative.io/authentication/registration-status")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"stytch_token\": {\n \"token_type\": \"magiclinks\",\n \"token\": \"cykuz7f22h7rx5SPomBZUB359jj6GA-4NUBkuZDiduun\"\n },\n \"session_duration_minutes\": 5\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-dev.narrative.io/authentication/registration-status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"stytch_token\": {\n \"token_type\": \"magiclinks\",\n \"token\": \"cykuz7f22h7rx5SPomBZUB359jj6GA-4NUBkuZDiduun\"\n },\n \"session_duration_minutes\": 5\n}"
response = http.request(request)
puts response.read_body{
"status": "complete",
"email": "[email protected]",
"stytch_session_token": "10hLht9FCo9cBp3I69uY5KjYMmy5VqmZjAVEz1CKZjsa",
"stytch_session_jwt": "eyJhbGciOiJSUzI1NiIsImtpZCI6Imp3ay10ZXN0LTk1YjU2OGZhLTk1NWUtNGQ2OC04NDljLTM5MDA0MmEwZTlmOCIsInR5cCI6IkpXVCJ9.eyJhdWQiOlsicHJvamVjdC10ZXN0LWQ1Y2E2MjhlLWFmMzctNDhmZC1hZTliLWIzMmUwY2Y5NmEyYyJdLCJleHAiOjE2ODUxMjkwNTAsImh0dHBzO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yFlS0Xs2j0Dje01WI0eqJYgSVTwB5ZMTWttJKqXjFPaLQ-7XkJxHtmpXTxCoO-U38kDba26cyhTQrXBoHV2c8KMtrBWS3L3_kN-gw96FzcJ0C2W8HxhZJrI_GIZ4OLxFy3jxXvjDcsjMX940w"
}{
"error": "Unauthorized",
"error_description": "You are not authorized to use this endpoint."
}{
"error": "Unauthorized",
"error_description": "You are not authorized to use this endpoint."
}{
"error": "Unauthorized",
"error_description": "You are not authorized to use this endpoint."
}{
"error": "Unauthorized",
"error_description": "You are not authorized to use this endpoint."
}Authentication
Report whether the user associatd to a Stytch OAuth or Magic Links token has been fully registered on Narrative side
Report whether the user associatd to a Stytch OAuth or Magic Links token has been fully registered on Narrative side. Provides a Stytch session token that can be used to access the login and register APIs.
POST
/
authentication
/
registration-status
Report whether the user associatd to a Stytch OAuth or Magic Links token has been fully registered on Narrative side
curl --request POST \
--url https://api-dev.narrative.io/authentication/registration-status \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"stytch_token": {
"token_type": "magiclinks",
"token": "cykuz7f22h7rx5SPomBZUB359jj6GA-4NUBkuZDiduun"
},
"session_duration_minutes": 5
}
'import requests
url = "https://api-dev.narrative.io/authentication/registration-status"
payload = {
"stytch_token": {
"token_type": "magiclinks",
"token": "cykuz7f22h7rx5SPomBZUB359jj6GA-4NUBkuZDiduun"
},
"session_duration_minutes": 5
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
stytch_token: {
token_type: 'magiclinks',
token: 'cykuz7f22h7rx5SPomBZUB359jj6GA-4NUBkuZDiduun'
},
session_duration_minutes: 5
})
};
fetch('https://api-dev.narrative.io/authentication/registration-status', 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://api-dev.narrative.io/authentication/registration-status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'stytch_token' => [
'token_type' => 'magiclinks',
'token' => 'cykuz7f22h7rx5SPomBZUB359jj6GA-4NUBkuZDiduun'
],
'session_duration_minutes' => 5
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-dev.narrative.io/authentication/registration-status"
payload := strings.NewReader("{\n \"stytch_token\": {\n \"token_type\": \"magiclinks\",\n \"token\": \"cykuz7f22h7rx5SPomBZUB359jj6GA-4NUBkuZDiduun\"\n },\n \"session_duration_minutes\": 5\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-dev.narrative.io/authentication/registration-status")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"stytch_token\": {\n \"token_type\": \"magiclinks\",\n \"token\": \"cykuz7f22h7rx5SPomBZUB359jj6GA-4NUBkuZDiduun\"\n },\n \"session_duration_minutes\": 5\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-dev.narrative.io/authentication/registration-status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"stytch_token\": {\n \"token_type\": \"magiclinks\",\n \"token\": \"cykuz7f22h7rx5SPomBZUB359jj6GA-4NUBkuZDiduun\"\n },\n \"session_duration_minutes\": 5\n}"
response = http.request(request)
puts response.read_body{
"status": "complete",
"email": "[email protected]",
"stytch_session_token": "10hLht9FCo9cBp3I69uY5KjYMmy5VqmZjAVEz1CKZjsa",
"stytch_session_jwt": "eyJhbGciOiJSUzI1NiIsImtpZCI6Imp3ay10ZXN0LTk1YjU2OGZhLTk1NWUtNGQ2OC04NDljLTM5MDA0MmEwZTlmOCIsInR5cCI6IkpXVCJ9.eyJhdWQiOlsicHJvamVjdC10ZXN0LWQ1Y2E2MjhlLWFmMzctNDhmZC1hZTliLWIzMmUwY2Y5NmEyYyJdLCJleHAiOjE2ODUxMjkwNTAsImh0dHBzOi8vc3R5dGNoLmNvbS9zZXNzaW9uIjp7ImlkIjoic2Vzc2lvbi10ZXN0LTRlNTg4ZDQ3LTJlZjctNDZhNy1iMGQxLTQxOGJhMmZjNTljMiIsInN0YXJ0ZWRfYXQiOiIyMDIzLTA1LTI2VDE5OjE0OjU1WiIsImxhc3RfYWNjZXNzZWRfYXQiOiIyMDIzLTA1LTI2VDE5OjE5OjEwWiIsImV4cGlyZXNfYXQiOiIyMDIzLTA1LTI2VDIwOjE0OjU1WiIsImF0dHJpYnV0ZXMiOnsidXNlcl9hZ2VudCI6IiIsImlwX2FkZHJlc3MiOiIifSwiYXV0aGVudGljYXRpb25fZmFjdG9ycyI6W3sidHlwZSI6Im9hdXRoIiwiZGVsaXZlcnlfbWV0aG9kIjoib2F1dGhfZ2l0aHViIiwibGFzdF9hdXRoZW50aWNhdGVkX2F0IjoiMjAyMy0wNS0yNlQxOToxNDo1NVoiLCJnaXRodWJfb2F1dGhfZmFjdG9yIjp7ImlkIjoib2F1dGgtdXNlci10ZXN0LTdlY2M5YjUxLTU0YzUtNDg2MS04NjI2LTQyM2Q0Y2ZiYjQxMiIsInByb3ZpZGVyX3N1YmplY3QiOiIxNDIzMjkifX1dfSwiaWF0IjoxNjg1MTI4NzUwLCJpc3MiOiJzdHl0Y2guY29tL3Byb2plY3QtdGVzdC1kNWNhNjI4ZS1hZjM3LTQ4ZmQtYWU5Yi1iMzJlMGNmOTZhMmMiLCJuYmYiOjE2ODUxMjg3NTAsInN1YiI6InVzZXItdGVzdC03ZDYzYmMwNS05YzlmLTRmMTktODhhYS1iMmQwODk3ZGNiN2YifQ.OthwVlyy7Eu0g8h9K3tG2KzZBiOi3hykP-BpdTjrR4tZUXwqPyYPs8BmiaPRQOd17zyUNLxjGH4q5sfU6F0z4BXQXd3U8hWdRYRmUNVFPvLhFWva5FNP5ZYRD8XX_cjYTWV0E41Zd_W3YvFK5hCYs7cwYyR0mMw2XRzTYX1CjTfHOtNmPW-uLwhvHqAroLa2vM7PoyFlS0Xs2j0Dje01WI0eqJYgSVTwB5ZMTWttJKqXjFPaLQ-7XkJxHtmpXTxCoO-U38kDba26cyhTQrXBoHV2c8KMtrBWS3L3_kN-gw96FzcJ0C2W8HxhZJrI_GIZ4OLxFy3jxXvjDcsjMX940w"
}{
"error": "Unauthorized",
"error_description": "You are not authorized to use this endpoint."
}{
"error": "Unauthorized",
"error_description": "You are not authorized to use this endpoint."
}{
"error": "Unauthorized",
"error_description": "You are not authorized to use this endpoint."
}{
"error": "Unauthorized",
"error_description": "You are not authorized to use this endpoint."
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Was this page helpful?
⌘I

