Create connect event
curl --request POST \
--url https://{projectId}.frontendapi.cloud.corbado.io/v2/connect/events \
--header 'Content-Type: application/json' \
--header 'X-Corbado-Process-ID: <api-key>' \
--data '
{
"message": "<string>",
"challenge": "<string>"
}
'import requests
url = "https://{projectId}.frontendapi.cloud.corbado.io/v2/connect/events"
payload = {
"message": "<string>",
"challenge": "<string>"
}
headers = {
"X-Corbado-Process-ID": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Corbado-Process-ID': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({message: '<string>', challenge: '<string>'})
};
fetch('https://{projectId}.frontendapi.cloud.corbado.io/v2/connect/events', 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://{projectId}.frontendapi.cloud.corbado.io/v2/connect/events",
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([
'message' => '<string>',
'challenge' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Corbado-Process-ID: <api-key>"
],
]);
$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://{projectId}.frontendapi.cloud.corbado.io/v2/connect/events"
payload := strings.NewReader("{\n \"message\": \"<string>\",\n \"challenge\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Corbado-Process-ID", "<api-key>")
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://{projectId}.frontendapi.cloud.corbado.io/v2/connect/events")
.header("X-Corbado-Process-ID", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"message\": \"<string>\",\n \"challenge\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{projectId}.frontendapi.cloud.corbado.io/v2/connect/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Corbado-Process-ID"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"message\": \"<string>\",\n \"challenge\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyPasskey flows
Create connect event
Creates a new user generated Corbado Connect event.
POST
/
v2
/
connect
/
events
Create connect event
curl --request POST \
--url https://{projectId}.frontendapi.cloud.corbado.io/v2/connect/events \
--header 'Content-Type: application/json' \
--header 'X-Corbado-Process-ID: <api-key>' \
--data '
{
"message": "<string>",
"challenge": "<string>"
}
'import requests
url = "https://{projectId}.frontendapi.cloud.corbado.io/v2/connect/events"
payload = {
"message": "<string>",
"challenge": "<string>"
}
headers = {
"X-Corbado-Process-ID": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Corbado-Process-ID': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({message: '<string>', challenge: '<string>'})
};
fetch('https://{projectId}.frontendapi.cloud.corbado.io/v2/connect/events', 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://{projectId}.frontendapi.cloud.corbado.io/v2/connect/events",
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([
'message' => '<string>',
'challenge' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Corbado-Process-ID: <api-key>"
],
]);
$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://{projectId}.frontendapi.cloud.corbado.io/v2/connect/events"
payload := strings.NewReader("{\n \"message\": \"<string>\",\n \"challenge\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Corbado-Process-ID", "<api-key>")
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://{projectId}.frontendapi.cloud.corbado.io/v2/connect/events")
.header("X-Corbado-Process-ID", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"message\": \"<string>\",\n \"challenge\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{projectId}.frontendapi.cloud.corbado.io/v2/connect/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Corbado-Process-ID"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"message\": \"<string>\",\n \"challenge\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
The process token returned by the corresponding Connect initialization endpoint. SDKs manage it automatically.
Body
application/json
Available options:
login-explicit-abort, login-error, login-error-untyped, login-error-unexpected, login-one-tap-switch, login-no-credentials, user-append-after-cross-platform-blacklisted, user-append-after-login-error-blacklisted, append-credential-exists, append-explicit-abort, append-error, append-error-unexpected, append-learn-more, manage-error-unexpected, manage-error, manage-learn-more, manage-credential-exists, manage-delete-explicit-abort, local-unlock Response
204
tbd
Was this page helpful?