Managed Auth Template Import
curl --request POST \
--url https://api.example.com/managed-auth/templates/import \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"revision": 123,
"template": {
"slug": "<string>",
"name": "<string>",
"domain": "<string>",
"category": "<string>",
"color": "<string>",
"description": "",
"method": "Managed login",
"login_url": "<string>",
"allowed_domains": [
"<string>"
],
"supports_totp": false
},
"login_function": {
"name": "<string>",
"source": "<string>",
"sha256": "<string>",
"description": ""
},
"verifier_function": {
"name": "<string>",
"source": "<string>",
"sha256": "<string>",
"description": ""
},
"bundle_sha256": "<string>",
"schema_version": 1
}
'import requests
url = "https://api.example.com/managed-auth/templates/import"
payload = {
"revision": 123,
"template": {
"slug": "<string>",
"name": "<string>",
"domain": "<string>",
"category": "<string>",
"color": "<string>",
"description": "",
"method": "Managed login",
"login_url": "<string>",
"allowed_domains": ["<string>"],
"supports_totp": False
},
"login_function": {
"name": "<string>",
"source": "<string>",
"sha256": "<string>",
"description": ""
},
"verifier_function": {
"name": "<string>",
"source": "<string>",
"sha256": "<string>",
"description": ""
},
"bundle_sha256": "<string>",
"schema_version": 1
}
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({
revision: 123,
template: {
slug: '<string>',
name: '<string>',
domain: '<string>',
category: '<string>',
color: '<string>',
description: '',
method: 'Managed login',
login_url: '<string>',
allowed_domains: ['<string>'],
supports_totp: false
},
login_function: {name: '<string>', source: '<string>', sha256: '<string>', description: ''},
verifier_function: {name: '<string>', source: '<string>', sha256: '<string>', description: ''},
bundle_sha256: '<string>',
schema_version: 1
})
};
fetch('https://api.example.com/managed-auth/templates/import', 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/templates/import",
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([
'revision' => 123,
'template' => [
'slug' => '<string>',
'name' => '<string>',
'domain' => '<string>',
'category' => '<string>',
'color' => '<string>',
'description' => '',
'method' => 'Managed login',
'login_url' => '<string>',
'allowed_domains' => [
'<string>'
],
'supports_totp' => false
],
'login_function' => [
'name' => '<string>',
'source' => '<string>',
'sha256' => '<string>',
'description' => ''
],
'verifier_function' => [
'name' => '<string>',
'source' => '<string>',
'sha256' => '<string>',
'description' => ''
],
'bundle_sha256' => '<string>',
'schema_version' => 1
]),
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/templates/import"
payload := strings.NewReader("{\n \"revision\": 123,\n \"template\": {\n \"slug\": \"<string>\",\n \"name\": \"<string>\",\n \"domain\": \"<string>\",\n \"category\": \"<string>\",\n \"color\": \"<string>\",\n \"description\": \"\",\n \"method\": \"Managed login\",\n \"login_url\": \"<string>\",\n \"allowed_domains\": [\n \"<string>\"\n ],\n \"supports_totp\": false\n },\n \"login_function\": {\n \"name\": \"<string>\",\n \"source\": \"<string>\",\n \"sha256\": \"<string>\",\n \"description\": \"\"\n },\n \"verifier_function\": {\n \"name\": \"<string>\",\n \"source\": \"<string>\",\n \"sha256\": \"<string>\",\n \"description\": \"\"\n },\n \"bundle_sha256\": \"<string>\",\n \"schema_version\": 1\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/templates/import")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"revision\": 123,\n \"template\": {\n \"slug\": \"<string>\",\n \"name\": \"<string>\",\n \"domain\": \"<string>\",\n \"category\": \"<string>\",\n \"color\": \"<string>\",\n \"description\": \"\",\n \"method\": \"Managed login\",\n \"login_url\": \"<string>\",\n \"allowed_domains\": [\n \"<string>\"\n ],\n \"supports_totp\": false\n },\n \"login_function\": {\n \"name\": \"<string>\",\n \"source\": \"<string>\",\n \"sha256\": \"<string>\",\n \"description\": \"\"\n },\n \"verifier_function\": {\n \"name\": \"<string>\",\n \"source\": \"<string>\",\n \"sha256\": \"<string>\",\n \"description\": \"\"\n },\n \"bundle_sha256\": \"<string>\",\n \"schema_version\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/managed-auth/templates/import")
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 \"revision\": 123,\n \"template\": {\n \"slug\": \"<string>\",\n \"name\": \"<string>\",\n \"domain\": \"<string>\",\n \"category\": \"<string>\",\n \"color\": \"<string>\",\n \"description\": \"\",\n \"method\": \"Managed login\",\n \"login_url\": \"<string>\",\n \"allowed_domains\": [\n \"<string>\"\n ],\n \"supports_totp\": false\n },\n \"login_function\": {\n \"name\": \"<string>\",\n \"source\": \"<string>\",\n \"sha256\": \"<string>\",\n \"description\": \"\"\n },\n \"verifier_function\": {\n \"name\": \"<string>\",\n \"source\": \"<string>\",\n \"sha256\": \"<string>\",\n \"description\": \"\"\n },\n \"bundle_sha256\": \"<string>\",\n \"schema_version\": 1\n}"
response = http.request(request)
puts response.read_body{
"slug": "<string>",
"dry_run": true,
"revision": 123,
"login_changed": true,
"verifier_changed": true,
"bundle_sha256": "<string>",
"target_state_sha256": "<string>",
"previous_revision": 123,
"metadata_changes": [
"<string>"
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}managed-auth
Managed Auth Template Import
POST
/
managed-auth
/
templates
/
import
Managed Auth Template Import
curl --request POST \
--url https://api.example.com/managed-auth/templates/import \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"revision": 123,
"template": {
"slug": "<string>",
"name": "<string>",
"domain": "<string>",
"category": "<string>",
"color": "<string>",
"description": "",
"method": "Managed login",
"login_url": "<string>",
"allowed_domains": [
"<string>"
],
"supports_totp": false
},
"login_function": {
"name": "<string>",
"source": "<string>",
"sha256": "<string>",
"description": ""
},
"verifier_function": {
"name": "<string>",
"source": "<string>",
"sha256": "<string>",
"description": ""
},
"bundle_sha256": "<string>",
"schema_version": 1
}
'import requests
url = "https://api.example.com/managed-auth/templates/import"
payload = {
"revision": 123,
"template": {
"slug": "<string>",
"name": "<string>",
"domain": "<string>",
"category": "<string>",
"color": "<string>",
"description": "",
"method": "Managed login",
"login_url": "<string>",
"allowed_domains": ["<string>"],
"supports_totp": False
},
"login_function": {
"name": "<string>",
"source": "<string>",
"sha256": "<string>",
"description": ""
},
"verifier_function": {
"name": "<string>",
"source": "<string>",
"sha256": "<string>",
"description": ""
},
"bundle_sha256": "<string>",
"schema_version": 1
}
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({
revision: 123,
template: {
slug: '<string>',
name: '<string>',
domain: '<string>',
category: '<string>',
color: '<string>',
description: '',
method: 'Managed login',
login_url: '<string>',
allowed_domains: ['<string>'],
supports_totp: false
},
login_function: {name: '<string>', source: '<string>', sha256: '<string>', description: ''},
verifier_function: {name: '<string>', source: '<string>', sha256: '<string>', description: ''},
bundle_sha256: '<string>',
schema_version: 1
})
};
fetch('https://api.example.com/managed-auth/templates/import', 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/templates/import",
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([
'revision' => 123,
'template' => [
'slug' => '<string>',
'name' => '<string>',
'domain' => '<string>',
'category' => '<string>',
'color' => '<string>',
'description' => '',
'method' => 'Managed login',
'login_url' => '<string>',
'allowed_domains' => [
'<string>'
],
'supports_totp' => false
],
'login_function' => [
'name' => '<string>',
'source' => '<string>',
'sha256' => '<string>',
'description' => ''
],
'verifier_function' => [
'name' => '<string>',
'source' => '<string>',
'sha256' => '<string>',
'description' => ''
],
'bundle_sha256' => '<string>',
'schema_version' => 1
]),
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/templates/import"
payload := strings.NewReader("{\n \"revision\": 123,\n \"template\": {\n \"slug\": \"<string>\",\n \"name\": \"<string>\",\n \"domain\": \"<string>\",\n \"category\": \"<string>\",\n \"color\": \"<string>\",\n \"description\": \"\",\n \"method\": \"Managed login\",\n \"login_url\": \"<string>\",\n \"allowed_domains\": [\n \"<string>\"\n ],\n \"supports_totp\": false\n },\n \"login_function\": {\n \"name\": \"<string>\",\n \"source\": \"<string>\",\n \"sha256\": \"<string>\",\n \"description\": \"\"\n },\n \"verifier_function\": {\n \"name\": \"<string>\",\n \"source\": \"<string>\",\n \"sha256\": \"<string>\",\n \"description\": \"\"\n },\n \"bundle_sha256\": \"<string>\",\n \"schema_version\": 1\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/templates/import")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"revision\": 123,\n \"template\": {\n \"slug\": \"<string>\",\n \"name\": \"<string>\",\n \"domain\": \"<string>\",\n \"category\": \"<string>\",\n \"color\": \"<string>\",\n \"description\": \"\",\n \"method\": \"Managed login\",\n \"login_url\": \"<string>\",\n \"allowed_domains\": [\n \"<string>\"\n ],\n \"supports_totp\": false\n },\n \"login_function\": {\n \"name\": \"<string>\",\n \"source\": \"<string>\",\n \"sha256\": \"<string>\",\n \"description\": \"\"\n },\n \"verifier_function\": {\n \"name\": \"<string>\",\n \"source\": \"<string>\",\n \"sha256\": \"<string>\",\n \"description\": \"\"\n },\n \"bundle_sha256\": \"<string>\",\n \"schema_version\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/managed-auth/templates/import")
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 \"revision\": 123,\n \"template\": {\n \"slug\": \"<string>\",\n \"name\": \"<string>\",\n \"domain\": \"<string>\",\n \"category\": \"<string>\",\n \"color\": \"<string>\",\n \"description\": \"\",\n \"method\": \"Managed login\",\n \"login_url\": \"<string>\",\n \"allowed_domains\": [\n \"<string>\"\n ],\n \"supports_totp\": false\n },\n \"login_function\": {\n \"name\": \"<string>\",\n \"source\": \"<string>\",\n \"sha256\": \"<string>\",\n \"description\": \"\"\n },\n \"verifier_function\": {\n \"name\": \"<string>\",\n \"source\": \"<string>\",\n \"sha256\": \"<string>\",\n \"description\": \"\"\n },\n \"bundle_sha256\": \"<string>\",\n \"schema_version\": 1\n}"
response = http.request(request)
puts response.read_body{
"slug": "<string>",
"dry_run": true,
"revision": 123,
"login_changed": true,
"verifier_changed": true,
"bundle_sha256": "<string>",
"target_state_sha256": "<string>",
"previous_revision": 123,
"metadata_changes": [
"<string>"
]
}{
"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
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Pattern:
^[0-9a-f]{64}$Response
Successful Response
Available options:
create, update, no_change Pattern:
^[0-9a-f]{64}$Was this page helpful?
⌘I

