curl --request POST \
--url https://{tenant_id}.hanko.io/profile \
--header 'Content-Type: application/json' \
--cookie hanko= \
--data '
{
"input_data": {
"webauthn_available": false,
"webauthn_conditional_mediation_available": false,
"webauthn_platform_authenticator_available": false
},
"csrf_token": "qvcZt29spXYO77Y9IaxxN4MzLnmbjozl"
}
'import requests
url = "https://{tenant_id}.hanko.io/profile"
payload = {
"input_data": {
"webauthn_available": False,
"webauthn_conditional_mediation_available": False,
"webauthn_platform_authenticator_available": False
},
"csrf_token": "qvcZt29spXYO77Y9IaxxN4MzLnmbjozl"
}
headers = {
"cookie": "hanko=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: 'hanko=', 'Content-Type': 'application/json'},
body: JSON.stringify({
input_data: {
webauthn_available: false,
webauthn_conditional_mediation_available: false,
webauthn_platform_authenticator_available: false
},
csrf_token: 'qvcZt29spXYO77Y9IaxxN4MzLnmbjozl'
})
};
fetch('https://{tenant_id}.hanko.io/profile', 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://{tenant_id}.hanko.io/profile",
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([
'input_data' => [
'webauthn_available' => false,
'webauthn_conditional_mediation_available' => false,
'webauthn_platform_authenticator_available' => false
],
'csrf_token' => 'qvcZt29spXYO77Y9IaxxN4MzLnmbjozl'
]),
CURLOPT_COOKIE => "hanko=",
CURLOPT_HTTPHEADER => [
"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://{tenant_id}.hanko.io/profile"
payload := strings.NewReader("{\n \"input_data\": {\n \"webauthn_available\": false,\n \"webauthn_conditional_mediation_available\": false,\n \"webauthn_platform_authenticator_available\": false\n },\n \"csrf_token\": \"qvcZt29spXYO77Y9IaxxN4MzLnmbjozl\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "hanko=")
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://{tenant_id}.hanko.io/profile")
.header("cookie", "hanko=")
.header("Content-Type", "application/json")
.body("{\n \"input_data\": {\n \"webauthn_available\": false,\n \"webauthn_conditional_mediation_available\": false,\n \"webauthn_platform_authenticator_available\": false\n },\n \"csrf_token\": \"qvcZt29spXYO77Y9IaxxN4MzLnmbjozl\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant_id}.hanko.io/profile")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cookie"] = 'hanko='
request["Content-Type"] = 'application/json'
request.body = "{\n \"input_data\": {\n \"webauthn_available\": false,\n \"webauthn_conditional_mediation_available\": false,\n \"webauthn_platform_authenticator_available\": false\n },\n \"csrf_token\": \"qvcZt29spXYO77Y9IaxxN4MzLnmbjozl\"\n}"
response = http.request(request)
puts response.read_body{
"actions": {
"register_client_capabilities": {
"action": "register_client_capabilities",
"href": "<string>",
"description": "<string>",
"inputs": {
"webauthn_available": {
"name": "webauthn_available",
"type": "boolean",
"required": true,
"min_length": 123,
"max_length": 123,
"hidden": true,
"value": "<string>",
"allowed_values": [
{
"name": "<string>",
"value": "<unknown>"
}
]
},
"webauthn_conditional_mediation_available": {
"name": "webauthn_conditional_mediation_available",
"type": "boolean",
"required": true,
"min_length": 123,
"max_length": 123,
"hidden": true,
"value": "<string>",
"allowed_values": [
{
"name": "<string>",
"value": "<unknown>"
}
]
},
"webauthn_platform_authenticator_available": {
"name": "webauthn_platform_authenticator_available",
"type": "boolean",
"required": true,
"min_length": 123,
"max_length": 123,
"hidden": true,
"value": "<string>",
"allowed_values": [
{
"name": "<string>",
"value": "<unknown>"
}
]
}
}
}
},
"name": "preflight",
"payload": {},
"status": 200,
"csrf_token": "HvUwWSfPgz7VnwiS8VMDpnhZ1wNwTNiV",
"links": []
}{
"actions": {
"account_delete": {
"action": "account_delete",
"href": "<string>",
"description": "<string>",
"inputs": {}
},
"connect_thirdparty_oauth_provider": {
"action": "connect_thirdparty_oauth_provider",
"href": "<string>",
"description": "<string>",
"inputs": {
"provider": {
"name": "provider",
"type": "string",
"required": true,
"min_length": 123,
"max_length": 123,
"hidden": true,
"value": "<string>",
"allowed_values": [
{
"name": "<string>"
}
]
},
"redirect_to": {
"name": "redirect_to",
"type": "string",
"required": true,
"min_length": 123,
"max_length": 123,
"hidden": true,
"value": "<string>",
"allowed_values": [
{
"name": "<string>",
"value": "<unknown>"
}
]
},
"code_verifier": {
"name": "code_verifier",
"type": "string",
"required": false,
"min_length": 123,
"max_length": 123,
"hidden": true,
"value": "<string>",
"allowed_values": [
{
"name": "<string>",
"value": "<unknown>"
}
]
}
}
},
"continue_to_otp_secret_creation": {
"action": "continue_to_otp_secret_creation",
"href": "<string>",
"description": "<string>",
"inputs": {}
},
"disconnect_thirdparty_oauth_provider": {
"action": "disconnect_thirdparty_oauth_provider",
"href": "<string>",
"description": "<string>",
"inputs": {
"identity_id": "<string>"
}
},
"email_create": {
"action": "email_create",
"href": "<string>",
"description": "<string>",
"inputs": {
"email": {
"name": "email",
"type": "email",
"required": true,
"min_length": 123,
"max_length": 120,
"hidden": false,
"value": "<string>",
"allowed_values": [
{
"name": "<string>",
"value": "<unknown>"
}
]
}
}
},
"email_delete": {
"action": "email_delete",
"href": "<string>",
"description": "<string>",
"inputs": {
"email_id": {
"name": "email_id",
"type": "string",
"required": true,
"min_length": 123,
"max_length": 123,
"hidden": true,
"value": "<string>",
"allowed_values": [
{
"name": "<string>",
"value": "<unknown>"
}
]
}
}
},
"email_set_primary": {
"action": "email_set_primary",
"href": "<string>",
"description": "<string>",
"inputs": {
"email_id": {
"name": "email_id",
"type": "string",
"required": true,
"min_length": 123,
"max_length": 123,
"hidden": true,
"value": "<string>",
"allowed_values": [
{
"name": "<string>",
"value": "<unknown>"
}
]
}
}
},
"email_verify": {
"action": "email_verify",
"href": "<string>",
"description": "<string>",
"inputs": {
"email_id": {
"name": "email_id",
"type": "string",
"required": true,
"min_length": 123,
"max_length": 123,
"hidden": true,
"value": "<string>",
"allowed_values": [
{
"name": "<string>",
"value": "<unknown>"
}
]
}
}
},
"otp_secret_delete": {
"action": "otp_secret_delete",
"href": "<string>",
"description": "<string>",
"inputs": {}
},
"password_create": {
"action": "password_create",
"href": "<string>",
"description": "<string>",
"inputs": {
"password": {
"name": "password",
"type": "password",
"required": true,
"min_length": 8,
"max_length": 123,
"hidden": false,
"value": "<string>",
"allowed_values": [
{
"name": "<string>",
"value": "<unknown>"
}
]
}
}
},
"password_update": {
"action": "password_update",
"href": "<string>",
"description": "<string>",
"inputs": {
"password": {
"name": "password",
"type": "password",
"required": true,
"min_length": 8,
"max_length": 123,
"hidden": false,
"value": "<string>",
"allowed_values": [
{
"name": "<string>",
"value": "<unknown>"
}
]
}
}
},
"password_delete": {
"action": "password_delete",
"href": "<string>",
"description": "<string>",
"inputs": {}
},
"patch_metadata": {
"action": "patch_metadata",
"href": "<string>",
"description": "<string>",
"inputs": {
"patch_metadata": {
"name": "patch_metadata",
"type": "json",
"required": true,
"min_length": 123,
"max_length": 123,
"hidden": false,
"value": "<string>",
"allowed_values": [
{
"name": "<string>",
"value": "<unknown>"
}
]
}
}
},
"security_key_create": {
"action": "security_key_create",
"href": "<string>",
"description": "<string>",
"inputs": {}
},
"security_key_delete": {
"action": "security_key_delete",
"href": "<string>",
"description": "<string>",
"inputs": {
"security_key_id": {
"name": "security_key_id",
"type": "string",
"required": true,
"min_length": 123,
"max_length": 123,
"hidden": true,
"value": "<string>",
"allowed_values": [
{
"name": "<string>",
"value": "<unknown>"
}
]
}
}
},
"session_delete": {
"action": "session_delete",
"href": "<string>",
"description": "<string>",
"inputs": {
"session_id": {
"name": "session_id",
"type": "string",
"required": true,
"min_length": 123,
"max_length": 123,
"hidden": true,
"value": "<string>",
"allowed_values": [
{
"name": "<string>",
"value": "<unknown>"
}
]
}
}
},
"username_set": {
"action": "username_set",
"href": "<string>",
"description": "<string>",
"inputs": {
"username": {
"name": "username",
"type": "string",
"required": false,
"min_length": 3,
"max_length": 40,
"hidden": false,
"value": "<string>",
"allowed_values": [
{
"name": "<string>",
"value": "<unknown>"
}
]
}
}
},
"username_delete": {
"action": "username_create",
"href": "<string>",
"description": "<string>",
"inputs": {}
},
"webauthn_credential_rename": {
"action": "webauthn_credential_rename",
"href": "<string>",
"description": "<string>",
"inputs": {
"passkey_id": {
"name": "passkey_id",
"type": "string",
"required": true,
"min_length": 123,
"max_length": 123,
"hidden": false,
"value": "<string>",
"allowed_values": [
{
"name": "<string>",
"value": "<unknown>"
}
]
},
"passkey_name": {
"name": "passkey_name",
"type": "string",
"required": true,
"min_length": 123,
"max_length": 123,
"hidden": false,
"value": "<string>",
"allowed_values": [
{
"name": "<string>",
"value": "<unknown>"
}
]
}
}
},
"webauthn_credential_create": {
"action": "webauthn_credential_create",
"href": "<string>",
"description": "<string>",
"inputs": {}
},
"webauthn_credential_delete": {
"action": "webauthn_credential_delete",
"href": "<string>",
"description": "<string>",
"inputs": {
"passkey_id": {
"name": "passkey_id",
"type": "string",
"required": true,
"min_length": 123,
"max_length": 123,
"hidden": false,
"value": "<string>",
"allowed_values": [
{
"name": "<string>",
"value": "<unknown>"
}
]
}
}
}
},
"name": "profile_init",
"payload": {
"user": {
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"passkeys": [
{
"aaguid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"backup_eligible": true,
"backup_state": true,
"created_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_used_at": "2023-11-07T05:31:56Z",
"mfa_only": true,
"public-key": "<string>",
"transports": []
}
],
"security_keys": [
{
"aaguid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"backup_eligible": true,
"backup_state": true,
"created_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_used_at": "2023-11-07T05:31:56Z",
"mfa_only": true,
"public-key": "<string>",
"transports": []
}
],
"emails": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"address": "jsmith@example.com",
"is_primary": true,
"is_verified": true,
"identity": {
"id": "<string>",
"provider": "<string>"
},
"identities": [
{
"id": "<string>",
"provider": "<string>"
}
]
}
],
"identities": [
{
"id": "<string>",
"identity_id": "<string>",
"provider": "<string>"
}
],
"metadata": {
"public_metadata": {},
"unsafe_metadata": {}
},
"mfa_config": {
"auth_app_set_up": true,
"totp_enabled": true,
"security_keys_enabled": true
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"given_name": "<string>",
"family_name": "<string>",
"picture": "<string>"
},
"sessions": [
{
"created_at": "2023-11-07T05:31:56Z",
"current": true,
"expires_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ip_address": "127.0.0.1",
"last_used": "2023-11-07T05:31:56Z",
"user_agent": "<string>",
"user_agent_raw": "<string>"
}
]
},
"csrf_token": "HvUwWSfPgz7VnwiS8VMDpnhZ1wNwTNiV",
"links": [],
"error": {
"code": "<string>",
"message": "<string>",
"cause": "<string>"
}
}{
"actions": {},
"name": "error",
"payload": {},
"status": 401,
"csrf_token": "HvUwWSfPgz7VnwiS8VMDpnhZ1wNwTNiV",
"links": [],
"error": {
"code": "passcode_max_attempts_reached",
"message": "The passcode was entered wrong too many times."
}
}{
"actions": {},
"name": "error",
"payload": {},
"status": 403,
"csrf_token": "HvUwWSfPgz7VnwiS8VMDpnhZ1wNwTNiV",
"links": [],
"error": {
"code": "operation_not_permitted_error",
"message": "The flow is not permitted."
}
}{
"actions": {},
"name": "error",
"payload": {},
"status": 404,
"csrf_token": "HvUwWSfPgz7VnwiS8VMDpnhZ1wNwTNiV",
"links": [],
"error": {
"code": "not_found",
"message": "The requested resource was not found."
}
}{
"actions": {},
"name": "error",
"payload": {},
"status": 410,
"csrf_token": "HvUwWSfPgz7VnwiS8VMDpnhZ1wNwTNiV",
"links": [],
"error": {
"code": "flow_expired_error",
"message": "The flow has expired."
}
}{
"actions": {},
"name": "error",
"payload": {
"resend_after": 60
},
"status": 429,
"csrf_token": "HvUwWSfPgz7VnwiS8VMDpnhZ1wNwTNiV",
"links": [],
"error": {
"code": "rate_limit_exceeded",
"message": "The rate limit has been exceeded."
}
}{
"actions": {},
"name": "error",
"payload": {},
"status": 500,
"csrf_token": "HvUwWSfPgz7VnwiS8VMDpnhZ1wNwTNiV",
"links": [],
"error": {
"code": "technical_error",
"message": "Something went wrong."
}
}Profile
Initialize or advance a profile flow.
curl --request POST \
--url https://{tenant_id}.hanko.io/profile \
--header 'Content-Type: application/json' \
--cookie hanko= \
--data '
{
"input_data": {
"webauthn_available": false,
"webauthn_conditional_mediation_available": false,
"webauthn_platform_authenticator_available": false
},
"csrf_token": "qvcZt29spXYO77Y9IaxxN4MzLnmbjozl"
}
'import requests
url = "https://{tenant_id}.hanko.io/profile"
payload = {
"input_data": {
"webauthn_available": False,
"webauthn_conditional_mediation_available": False,
"webauthn_platform_authenticator_available": False
},
"csrf_token": "qvcZt29spXYO77Y9IaxxN4MzLnmbjozl"
}
headers = {
"cookie": "hanko=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: 'hanko=', 'Content-Type': 'application/json'},
body: JSON.stringify({
input_data: {
webauthn_available: false,
webauthn_conditional_mediation_available: false,
webauthn_platform_authenticator_available: false
},
csrf_token: 'qvcZt29spXYO77Y9IaxxN4MzLnmbjozl'
})
};
fetch('https://{tenant_id}.hanko.io/profile', 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://{tenant_id}.hanko.io/profile",
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([
'input_data' => [
'webauthn_available' => false,
'webauthn_conditional_mediation_available' => false,
'webauthn_platform_authenticator_available' => false
],
'csrf_token' => 'qvcZt29spXYO77Y9IaxxN4MzLnmbjozl'
]),
CURLOPT_COOKIE => "hanko=",
CURLOPT_HTTPHEADER => [
"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://{tenant_id}.hanko.io/profile"
payload := strings.NewReader("{\n \"input_data\": {\n \"webauthn_available\": false,\n \"webauthn_conditional_mediation_available\": false,\n \"webauthn_platform_authenticator_available\": false\n },\n \"csrf_token\": \"qvcZt29spXYO77Y9IaxxN4MzLnmbjozl\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "hanko=")
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://{tenant_id}.hanko.io/profile")
.header("cookie", "hanko=")
.header("Content-Type", "application/json")
.body("{\n \"input_data\": {\n \"webauthn_available\": false,\n \"webauthn_conditional_mediation_available\": false,\n \"webauthn_platform_authenticator_available\": false\n },\n \"csrf_token\": \"qvcZt29spXYO77Y9IaxxN4MzLnmbjozl\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant_id}.hanko.io/profile")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cookie"] = 'hanko='
request["Content-Type"] = 'application/json'
request.body = "{\n \"input_data\": {\n \"webauthn_available\": false,\n \"webauthn_conditional_mediation_available\": false,\n \"webauthn_platform_authenticator_available\": false\n },\n \"csrf_token\": \"qvcZt29spXYO77Y9IaxxN4MzLnmbjozl\"\n}"
response = http.request(request)
puts response.read_body{
"actions": {
"register_client_capabilities": {
"action": "register_client_capabilities",
"href": "<string>",
"description": "<string>",
"inputs": {
"webauthn_available": {
"name": "webauthn_available",
"type": "boolean",
"required": true,
"min_length": 123,
"max_length": 123,
"hidden": true,
"value": "<string>",
"allowed_values": [
{
"name": "<string>",
"value": "<unknown>"
}
]
},
"webauthn_conditional_mediation_available": {
"name": "webauthn_conditional_mediation_available",
"type": "boolean",
"required": true,
"min_length": 123,
"max_length": 123,
"hidden": true,
"value": "<string>",
"allowed_values": [
{
"name": "<string>",
"value": "<unknown>"
}
]
},
"webauthn_platform_authenticator_available": {
"name": "webauthn_platform_authenticator_available",
"type": "boolean",
"required": true,
"min_length": 123,
"max_length": 123,
"hidden": true,
"value": "<string>",
"allowed_values": [
{
"name": "<string>",
"value": "<unknown>"
}
]
}
}
}
},
"name": "preflight",
"payload": {},
"status": 200,
"csrf_token": "HvUwWSfPgz7VnwiS8VMDpnhZ1wNwTNiV",
"links": []
}{
"actions": {
"account_delete": {
"action": "account_delete",
"href": "<string>",
"description": "<string>",
"inputs": {}
},
"connect_thirdparty_oauth_provider": {
"action": "connect_thirdparty_oauth_provider",
"href": "<string>",
"description": "<string>",
"inputs": {
"provider": {
"name": "provider",
"type": "string",
"required": true,
"min_length": 123,
"max_length": 123,
"hidden": true,
"value": "<string>",
"allowed_values": [
{
"name": "<string>"
}
]
},
"redirect_to": {
"name": "redirect_to",
"type": "string",
"required": true,
"min_length": 123,
"max_length": 123,
"hidden": true,
"value": "<string>",
"allowed_values": [
{
"name": "<string>",
"value": "<unknown>"
}
]
},
"code_verifier": {
"name": "code_verifier",
"type": "string",
"required": false,
"min_length": 123,
"max_length": 123,
"hidden": true,
"value": "<string>",
"allowed_values": [
{
"name": "<string>",
"value": "<unknown>"
}
]
}
}
},
"continue_to_otp_secret_creation": {
"action": "continue_to_otp_secret_creation",
"href": "<string>",
"description": "<string>",
"inputs": {}
},
"disconnect_thirdparty_oauth_provider": {
"action": "disconnect_thirdparty_oauth_provider",
"href": "<string>",
"description": "<string>",
"inputs": {
"identity_id": "<string>"
}
},
"email_create": {
"action": "email_create",
"href": "<string>",
"description": "<string>",
"inputs": {
"email": {
"name": "email",
"type": "email",
"required": true,
"min_length": 123,
"max_length": 120,
"hidden": false,
"value": "<string>",
"allowed_values": [
{
"name": "<string>",
"value": "<unknown>"
}
]
}
}
},
"email_delete": {
"action": "email_delete",
"href": "<string>",
"description": "<string>",
"inputs": {
"email_id": {
"name": "email_id",
"type": "string",
"required": true,
"min_length": 123,
"max_length": 123,
"hidden": true,
"value": "<string>",
"allowed_values": [
{
"name": "<string>",
"value": "<unknown>"
}
]
}
}
},
"email_set_primary": {
"action": "email_set_primary",
"href": "<string>",
"description": "<string>",
"inputs": {
"email_id": {
"name": "email_id",
"type": "string",
"required": true,
"min_length": 123,
"max_length": 123,
"hidden": true,
"value": "<string>",
"allowed_values": [
{
"name": "<string>",
"value": "<unknown>"
}
]
}
}
},
"email_verify": {
"action": "email_verify",
"href": "<string>",
"description": "<string>",
"inputs": {
"email_id": {
"name": "email_id",
"type": "string",
"required": true,
"min_length": 123,
"max_length": 123,
"hidden": true,
"value": "<string>",
"allowed_values": [
{
"name": "<string>",
"value": "<unknown>"
}
]
}
}
},
"otp_secret_delete": {
"action": "otp_secret_delete",
"href": "<string>",
"description": "<string>",
"inputs": {}
},
"password_create": {
"action": "password_create",
"href": "<string>",
"description": "<string>",
"inputs": {
"password": {
"name": "password",
"type": "password",
"required": true,
"min_length": 8,
"max_length": 123,
"hidden": false,
"value": "<string>",
"allowed_values": [
{
"name": "<string>",
"value": "<unknown>"
}
]
}
}
},
"password_update": {
"action": "password_update",
"href": "<string>",
"description": "<string>",
"inputs": {
"password": {
"name": "password",
"type": "password",
"required": true,
"min_length": 8,
"max_length": 123,
"hidden": false,
"value": "<string>",
"allowed_values": [
{
"name": "<string>",
"value": "<unknown>"
}
]
}
}
},
"password_delete": {
"action": "password_delete",
"href": "<string>",
"description": "<string>",
"inputs": {}
},
"patch_metadata": {
"action": "patch_metadata",
"href": "<string>",
"description": "<string>",
"inputs": {
"patch_metadata": {
"name": "patch_metadata",
"type": "json",
"required": true,
"min_length": 123,
"max_length": 123,
"hidden": false,
"value": "<string>",
"allowed_values": [
{
"name": "<string>",
"value": "<unknown>"
}
]
}
}
},
"security_key_create": {
"action": "security_key_create",
"href": "<string>",
"description": "<string>",
"inputs": {}
},
"security_key_delete": {
"action": "security_key_delete",
"href": "<string>",
"description": "<string>",
"inputs": {
"security_key_id": {
"name": "security_key_id",
"type": "string",
"required": true,
"min_length": 123,
"max_length": 123,
"hidden": true,
"value": "<string>",
"allowed_values": [
{
"name": "<string>",
"value": "<unknown>"
}
]
}
}
},
"session_delete": {
"action": "session_delete",
"href": "<string>",
"description": "<string>",
"inputs": {
"session_id": {
"name": "session_id",
"type": "string",
"required": true,
"min_length": 123,
"max_length": 123,
"hidden": true,
"value": "<string>",
"allowed_values": [
{
"name": "<string>",
"value": "<unknown>"
}
]
}
}
},
"username_set": {
"action": "username_set",
"href": "<string>",
"description": "<string>",
"inputs": {
"username": {
"name": "username",
"type": "string",
"required": false,
"min_length": 3,
"max_length": 40,
"hidden": false,
"value": "<string>",
"allowed_values": [
{
"name": "<string>",
"value": "<unknown>"
}
]
}
}
},
"username_delete": {
"action": "username_create",
"href": "<string>",
"description": "<string>",
"inputs": {}
},
"webauthn_credential_rename": {
"action": "webauthn_credential_rename",
"href": "<string>",
"description": "<string>",
"inputs": {
"passkey_id": {
"name": "passkey_id",
"type": "string",
"required": true,
"min_length": 123,
"max_length": 123,
"hidden": false,
"value": "<string>",
"allowed_values": [
{
"name": "<string>",
"value": "<unknown>"
}
]
},
"passkey_name": {
"name": "passkey_name",
"type": "string",
"required": true,
"min_length": 123,
"max_length": 123,
"hidden": false,
"value": "<string>",
"allowed_values": [
{
"name": "<string>",
"value": "<unknown>"
}
]
}
}
},
"webauthn_credential_create": {
"action": "webauthn_credential_create",
"href": "<string>",
"description": "<string>",
"inputs": {}
},
"webauthn_credential_delete": {
"action": "webauthn_credential_delete",
"href": "<string>",
"description": "<string>",
"inputs": {
"passkey_id": {
"name": "passkey_id",
"type": "string",
"required": true,
"min_length": 123,
"max_length": 123,
"hidden": false,
"value": "<string>",
"allowed_values": [
{
"name": "<string>",
"value": "<unknown>"
}
]
}
}
}
},
"name": "profile_init",
"payload": {
"user": {
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"passkeys": [
{
"aaguid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"backup_eligible": true,
"backup_state": true,
"created_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_used_at": "2023-11-07T05:31:56Z",
"mfa_only": true,
"public-key": "<string>",
"transports": []
}
],
"security_keys": [
{
"aaguid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"backup_eligible": true,
"backup_state": true,
"created_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_used_at": "2023-11-07T05:31:56Z",
"mfa_only": true,
"public-key": "<string>",
"transports": []
}
],
"emails": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"address": "jsmith@example.com",
"is_primary": true,
"is_verified": true,
"identity": {
"id": "<string>",
"provider": "<string>"
},
"identities": [
{
"id": "<string>",
"provider": "<string>"
}
]
}
],
"identities": [
{
"id": "<string>",
"identity_id": "<string>",
"provider": "<string>"
}
],
"metadata": {
"public_metadata": {},
"unsafe_metadata": {}
},
"mfa_config": {
"auth_app_set_up": true,
"totp_enabled": true,
"security_keys_enabled": true
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"given_name": "<string>",
"family_name": "<string>",
"picture": "<string>"
},
"sessions": [
{
"created_at": "2023-11-07T05:31:56Z",
"current": true,
"expires_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ip_address": "127.0.0.1",
"last_used": "2023-11-07T05:31:56Z",
"user_agent": "<string>",
"user_agent_raw": "<string>"
}
]
},
"csrf_token": "HvUwWSfPgz7VnwiS8VMDpnhZ1wNwTNiV",
"links": [],
"error": {
"code": "<string>",
"message": "<string>",
"cause": "<string>"
}
}{
"actions": {},
"name": "error",
"payload": {},
"status": 401,
"csrf_token": "HvUwWSfPgz7VnwiS8VMDpnhZ1wNwTNiV",
"links": [],
"error": {
"code": "passcode_max_attempts_reached",
"message": "The passcode was entered wrong too many times."
}
}{
"actions": {},
"name": "error",
"payload": {},
"status": 403,
"csrf_token": "HvUwWSfPgz7VnwiS8VMDpnhZ1wNwTNiV",
"links": [],
"error": {
"code": "operation_not_permitted_error",
"message": "The flow is not permitted."
}
}{
"actions": {},
"name": "error",
"payload": {},
"status": 404,
"csrf_token": "HvUwWSfPgz7VnwiS8VMDpnhZ1wNwTNiV",
"links": [],
"error": {
"code": "not_found",
"message": "The requested resource was not found."
}
}{
"actions": {},
"name": "error",
"payload": {},
"status": 410,
"csrf_token": "HvUwWSfPgz7VnwiS8VMDpnhZ1wNwTNiV",
"links": [],
"error": {
"code": "flow_expired_error",
"message": "The flow has expired."
}
}{
"actions": {},
"name": "error",
"payload": {
"resend_after": 60
},
"status": 429,
"csrf_token": "HvUwWSfPgz7VnwiS8VMDpnhZ1wNwTNiV",
"links": [],
"error": {
"code": "rate_limit_exceeded",
"message": "The rate limit has been exceeded."
}
}{
"actions": {},
"name": "error",
"payload": {},
"status": 500,
"csrf_token": "HvUwWSfPgz7VnwiS8VMDpnhZ1wNwTNiV",
"links": [],
"error": {
"code": "technical_error",
"message": "Something went wrong."
}
}Authorizations
Headers
Used to internationalize outgoing emails (e.g. for email verification, recovery, etc.).
If email delivery by Hanko is enabled the values for supported languages are:
- "bn" (Bengali/Bangla)
- "de" (German)
- "en" (English)
- "fr" (French)
- "it" (Italian)
- "nl" (Dutch)
- "pt-BR" (Brazilian Portuguese),
- "zh" (Chinese)
If email delivery by Hanko is disabled and a webhook has been configured for the email.send event, the
JWT payload of the token contained in the response to the webhook endpoint contains a language claim that
reflects the value originally passed as the header value.
bn, de, en, fr, it, nl, pt-BR, zh Query Parameters
String of the format {action_name}@{flow_id}. Indicates the action to perform on the flow with the
given flow_id. Omitting the query parameter initializes a new flow.
Note for playground usage: You can derive the value for this query parameter from the action's href
property in a flow state response, e.g. for an href value of
/login?action=register_client_capabilities%4015655672-41ca-48cc-afb1-90be77075764 the (non-URL-encoded) value
would be register_client_capabilities@15655672-41ca-48cc-afb1-90be77075764.
"register_client_capabilities@15655672-41ca-48cc-afb1-90be77075764"
Body
ProfileRequestBody
Input data for the register_client_capabilities action.
- RegisterClientCapabilities
- ConnectThirdPartyOAuthProvider
- DisconnectThirdPartyOAuthProvider
- EmailCreate
- EmailDelete
- EmailSetPrimary
- EmailVerify
- ExchangeToken
- PasswordCreate
- PasswordUpdate
- PatchMetadata
- OTPCodeVerify
- SecurityKeyDelete
- SessionDelete
- UsernameSet
- VerifyPasscode
- WebauthnCredentialRename
- WebauthnVerifyAttestationResponse
Show child attributes
Show child attributes
Not required on flow initialization, i.e. on requests without an action
query parameter.
Required on all other requests performing an action, i.e. on requests that use an action
query parameter. Should be the csrf_token value from the most recent flow state response.
"qvcZt29spXYO77Y9IaxxN4MzLnmbjozl"
Response
ProfileFlowResponse
- Preflight
- ProfileInit
- ProfileAccountDeleted
- PasscodeConfirmation
- ProfileWebauthnCredentialVerification
- MFAOTPSecretCreation
- ThirdParty
List of actions that can be performed in the current flow state in order to advance the flow to the next state.
Depending on user details (e.g. presence or absence of credentials) or the tenant's configuration some actions may or may not be present in the response.
Show child attributes
Show child attributes
The name of the flow state.
preflight Additional data that can be used by the client (e.g. user or sessions data provided in the
profile flow) or should/must be used as intermediary data in an out of band process to produce input data
for advancing the flow (e.g. the WebAuthn credential request/creation options that must be passed to the
Webauthn API to produce an assertion/attestation).
The HTTP response status code for this flow response.
200 Token to prevent Cross-Site Request Forgeries.
"HvUwWSfPgz7VnwiS8VMDpnhZ1wNwTNiV"
Show child attributes
Show child attributes
[]
Was this page helpful?