Managed Auth Connection Create
curl --request POST \
--url https://api.example.com/managed-auth/connections \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"label": "<string>",
"credentials": {
"password": "<string>",
"username": "<string>",
"email": "<string>",
"mfa_secret": "<string>"
},
"template_id": "<string>",
"schedule": false,
"domain": "<string>",
"login_url": "<string>",
"allowed_domains": [
"<string>"
],
"login_source": {
"kind": "<string>",
"function_id": "<string>"
},
"verifier_source": {
"kind": "<string>",
"function_id": "<string>"
}
}
'import requests
url = "https://api.example.com/managed-auth/connections"
payload = {
"label": "<string>",
"credentials": {
"password": "<string>",
"username": "<string>",
"email": "<string>",
"mfa_secret": "<string>"
},
"template_id": "<string>",
"schedule": False,
"domain": "<string>",
"login_url": "<string>",
"allowed_domains": ["<string>"],
"login_source": {
"kind": "<string>",
"function_id": "<string>"
},
"verifier_source": {
"kind": "<string>",
"function_id": "<string>"
}
}
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({
label: '<string>',
credentials: {
password: '<string>',
username: '<string>',
email: '<string>',
mfa_secret: '<string>'
},
template_id: '<string>',
schedule: false,
domain: '<string>',
login_url: '<string>',
allowed_domains: ['<string>'],
login_source: {kind: '<string>', function_id: '<string>'},
verifier_source: {kind: '<string>', function_id: '<string>'}
})
};
fetch('https://api.example.com/managed-auth/connections', 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.example.com/managed-auth/connections",
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([
'label' => '<string>',
'credentials' => [
'password' => '<string>',
'username' => '<string>',
'email' => '<string>',
'mfa_secret' => '<string>'
],
'template_id' => '<string>',
'schedule' => false,
'domain' => '<string>',
'login_url' => '<string>',
'allowed_domains' => [
'<string>'
],
'login_source' => [
'kind' => '<string>',
'function_id' => '<string>'
],
'verifier_source' => [
'kind' => '<string>',
'function_id' => '<string>'
]
]),
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.example.com/managed-auth/connections"
payload := strings.NewReader("{\n \"label\": \"<string>\",\n \"credentials\": {\n \"password\": \"<string>\",\n \"username\": \"<string>\",\n \"email\": \"<string>\",\n \"mfa_secret\": \"<string>\"\n },\n \"template_id\": \"<string>\",\n \"schedule\": false,\n \"domain\": \"<string>\",\n \"login_url\": \"<string>\",\n \"allowed_domains\": [\n \"<string>\"\n ],\n \"login_source\": {\n \"kind\": \"<string>\",\n \"function_id\": \"<string>\"\n },\n \"verifier_source\": {\n \"kind\": \"<string>\",\n \"function_id\": \"<string>\"\n }\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.example.com/managed-auth/connections")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"label\": \"<string>\",\n \"credentials\": {\n \"password\": \"<string>\",\n \"username\": \"<string>\",\n \"email\": \"<string>\",\n \"mfa_secret\": \"<string>\"\n },\n \"template_id\": \"<string>\",\n \"schedule\": false,\n \"domain\": \"<string>\",\n \"login_url\": \"<string>\",\n \"allowed_domains\": [\n \"<string>\"\n ],\n \"login_source\": {\n \"kind\": \"<string>\",\n \"function_id\": \"<string>\"\n },\n \"verifier_source\": {\n \"kind\": \"<string>\",\n \"function_id\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/managed-auth/connections")
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 \"label\": \"<string>\",\n \"credentials\": {\n \"password\": \"<string>\",\n \"username\": \"<string>\",\n \"email\": \"<string>\",\n \"mfa_secret\": \"<string>\"\n },\n \"template_id\": \"<string>\",\n \"schedule\": false,\n \"domain\": \"<string>\",\n \"login_url\": \"<string>\",\n \"allowed_domains\": [\n \"<string>\"\n ],\n \"login_source\": {\n \"kind\": \"<string>\",\n \"function_id\": \"<string>\"\n },\n \"verifier_source\": {\n \"kind\": \"<string>\",\n \"function_id\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"label": "<string>",
"domain": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"template_id": "<string>",
"template_slug": "<string>",
"template_name": "<string>",
"login_url": "<string>",
"allowed_domains": [
"<string>"
],
"profile_id": "<string>",
"vault_id": "<string>",
"login_source_function_id": "<string>",
"login_source_function_version": "<string>",
"verifier_source_function_id": "<string>",
"verifier_source_function_version": "<string>",
"functions_editable": false,
"last_checked_at": "2023-11-07T05:31:56Z",
"last_error": "<string>",
"disconnected_at": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}managed-auth
Managed Auth Connection Create
POST
/
managed-auth
/
connections
Managed Auth Connection Create
curl --request POST \
--url https://api.example.com/managed-auth/connections \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"label": "<string>",
"credentials": {
"password": "<string>",
"username": "<string>",
"email": "<string>",
"mfa_secret": "<string>"
},
"template_id": "<string>",
"schedule": false,
"domain": "<string>",
"login_url": "<string>",
"allowed_domains": [
"<string>"
],
"login_source": {
"kind": "<string>",
"function_id": "<string>"
},
"verifier_source": {
"kind": "<string>",
"function_id": "<string>"
}
}
'import requests
url = "https://api.example.com/managed-auth/connections"
payload = {
"label": "<string>",
"credentials": {
"password": "<string>",
"username": "<string>",
"email": "<string>",
"mfa_secret": "<string>"
},
"template_id": "<string>",
"schedule": False,
"domain": "<string>",
"login_url": "<string>",
"allowed_domains": ["<string>"],
"login_source": {
"kind": "<string>",
"function_id": "<string>"
},
"verifier_source": {
"kind": "<string>",
"function_id": "<string>"
}
}
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({
label: '<string>',
credentials: {
password: '<string>',
username: '<string>',
email: '<string>',
mfa_secret: '<string>'
},
template_id: '<string>',
schedule: false,
domain: '<string>',
login_url: '<string>',
allowed_domains: ['<string>'],
login_source: {kind: '<string>', function_id: '<string>'},
verifier_source: {kind: '<string>', function_id: '<string>'}
})
};
fetch('https://api.example.com/managed-auth/connections', 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.example.com/managed-auth/connections",
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([
'label' => '<string>',
'credentials' => [
'password' => '<string>',
'username' => '<string>',
'email' => '<string>',
'mfa_secret' => '<string>'
],
'template_id' => '<string>',
'schedule' => false,
'domain' => '<string>',
'login_url' => '<string>',
'allowed_domains' => [
'<string>'
],
'login_source' => [
'kind' => '<string>',
'function_id' => '<string>'
],
'verifier_source' => [
'kind' => '<string>',
'function_id' => '<string>'
]
]),
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.example.com/managed-auth/connections"
payload := strings.NewReader("{\n \"label\": \"<string>\",\n \"credentials\": {\n \"password\": \"<string>\",\n \"username\": \"<string>\",\n \"email\": \"<string>\",\n \"mfa_secret\": \"<string>\"\n },\n \"template_id\": \"<string>\",\n \"schedule\": false,\n \"domain\": \"<string>\",\n \"login_url\": \"<string>\",\n \"allowed_domains\": [\n \"<string>\"\n ],\n \"login_source\": {\n \"kind\": \"<string>\",\n \"function_id\": \"<string>\"\n },\n \"verifier_source\": {\n \"kind\": \"<string>\",\n \"function_id\": \"<string>\"\n }\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.example.com/managed-auth/connections")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"label\": \"<string>\",\n \"credentials\": {\n \"password\": \"<string>\",\n \"username\": \"<string>\",\n \"email\": \"<string>\",\n \"mfa_secret\": \"<string>\"\n },\n \"template_id\": \"<string>\",\n \"schedule\": false,\n \"domain\": \"<string>\",\n \"login_url\": \"<string>\",\n \"allowed_domains\": [\n \"<string>\"\n ],\n \"login_source\": {\n \"kind\": \"<string>\",\n \"function_id\": \"<string>\"\n },\n \"verifier_source\": {\n \"kind\": \"<string>\",\n \"function_id\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/managed-auth/connections")
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 \"label\": \"<string>\",\n \"credentials\": {\n \"password\": \"<string>\",\n \"username\": \"<string>\",\n \"email\": \"<string>\",\n \"mfa_secret\": \"<string>\"\n },\n \"template_id\": \"<string>\",\n \"schedule\": false,\n \"domain\": \"<string>\",\n \"login_url\": \"<string>\",\n \"allowed_domains\": [\n \"<string>\"\n ],\n \"login_source\": {\n \"kind\": \"<string>\",\n \"function_id\": \"<string>\"\n },\n \"verifier_source\": {\n \"kind\": \"<string>\",\n \"function_id\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"label": "<string>",
"domain": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"template_id": "<string>",
"template_slug": "<string>",
"template_name": "<string>",
"login_url": "<string>",
"allowed_domains": [
"<string>"
],
"profile_id": "<string>",
"vault_id": "<string>",
"login_source_function_id": "<string>",
"login_source_function_version": "<string>",
"verifier_source_function_id": "<string>",
"verifier_source_function_version": "<string>",
"functions_editable": false,
"last_checked_at": "2023-11-07T05:31:56Z",
"last_error": "<string>",
"disconnected_at": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Body
application/json
Required string length:
1 - 120Show child attributes
Show child attributes
- ManagedAuthExistingFunctionSource
- ManagedAuthInlineFunctionSource
Show child attributes
Show child attributes
- ManagedAuthExistingFunctionSource
- ManagedAuthInlineFunctionSource
Show child attributes
Show child attributes
Response
Successful Response
Available options:
provisioning, resetting, setup_required, authenticated, needs_reauth, error, disconnected Available options:
auto, manual Was this page helpful?
⌘I

