Go
package example
import (
context "context"
management "github.com/auth0/go-auth0/management/management"
client "github.com/auth0/go-auth0/management/management/client"
option "github.com/auth0/go-auth0/management/management/option"
)
func do() {
client := client.NewClient(
option.WithToken(
"<token>",
),
)
request := &management.CreateFormRequestContent{
Name: "name",
}
client.Forms.Create(
context.TODO(),
request,
)
}import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.forms.create({
name: "name",
});
}
main();import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.forms.create({
name: "name",
});
}
main();curl --request POST \
--url https://{tenantDomain}/api/v2/forms \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"ending": {
"after_submit": {
"flow_id": "<string>"
},
"resume_flow": true
},
"languages": {
"default": "<string>",
"primary": "<string>"
},
"messages": {
"custom": {},
"errors": {}
},
"nodes": [
{
"config": {
"flow_id": "<string>",
"next_node": "<string>"
},
"id": "<string>",
"type": "FLOW",
"alias": "<string>"
}
],
"start": {
"hidden_fields": [
{
"key": "<string>",
"value": "<string>"
}
],
"next_node": "<string>"
},
"style": {
"css": "<string>"
},
"translations": {}
}
'import requests
url = "https://{tenantDomain}/api/v2/forms"
payload = {
"name": "<string>",
"ending": {
"after_submit": { "flow_id": "<string>" },
"resume_flow": True
},
"languages": {
"default": "<string>",
"primary": "<string>"
},
"messages": {
"custom": {},
"errors": {}
},
"nodes": [
{
"config": {
"flow_id": "<string>",
"next_node": "<string>"
},
"id": "<string>",
"type": "FLOW",
"alias": "<string>"
}
],
"start": {
"hidden_fields": [
{
"key": "<string>",
"value": "<string>"
}
],
"next_node": "<string>"
},
"style": { "css": "<string>" },
"translations": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{tenantDomain}/api/v2/forms",
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([
'name' => '<string>',
'ending' => [
'after_submit' => [
'flow_id' => '<string>'
],
'resume_flow' => true
],
'languages' => [
'default' => '<string>',
'primary' => '<string>'
],
'messages' => [
'custom' => [
],
'errors' => [
]
],
'nodes' => [
[
'config' => [
'flow_id' => '<string>',
'next_node' => '<string>'
],
'id' => '<string>',
'type' => 'FLOW',
'alias' => '<string>'
]
],
'start' => [
'hidden_fields' => [
[
'key' => '<string>',
'value' => '<string>'
]
],
'next_node' => '<string>'
],
'style' => [
'css' => '<string>'
],
'translations' => [
]
]),
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;
}HttpResponse<String> response = Unirest.post("https://{tenantDomain}/api/v2/forms")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"ending\": {\n \"after_submit\": {\n \"flow_id\": \"<string>\"\n },\n \"resume_flow\": true\n },\n \"languages\": {\n \"default\": \"<string>\",\n \"primary\": \"<string>\"\n },\n \"messages\": {\n \"custom\": {},\n \"errors\": {}\n },\n \"nodes\": [\n {\n \"config\": {\n \"flow_id\": \"<string>\",\n \"next_node\": \"<string>\"\n },\n \"id\": \"<string>\",\n \"type\": \"FLOW\",\n \"alias\": \"<string>\"\n }\n ],\n \"start\": {\n \"hidden_fields\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"next_node\": \"<string>\"\n },\n \"style\": {\n \"css\": \"<string>\"\n },\n \"translations\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenantDomain}/api/v2/forms")
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 \"name\": \"<string>\",\n \"ending\": {\n \"after_submit\": {\n \"flow_id\": \"<string>\"\n },\n \"resume_flow\": true\n },\n \"languages\": {\n \"default\": \"<string>\",\n \"primary\": \"<string>\"\n },\n \"messages\": {\n \"custom\": {},\n \"errors\": {}\n },\n \"nodes\": [\n {\n \"config\": {\n \"flow_id\": \"<string>\",\n \"next_node\": \"<string>\"\n },\n \"id\": \"<string>\",\n \"type\": \"FLOW\",\n \"alias\": \"<string>\"\n }\n ],\n \"start\": {\n \"hidden_fields\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"next_node\": \"<string>\"\n },\n \"style\": {\n \"css\": \"<string>\"\n },\n \"translations\": {}\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"name": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"embedded_at": "2023-12-25",
"ending": {
"after_submit": {
"flow_id": "<string>"
},
"coordinates": {
"x": 0,
"y": 0
},
"redirection": {
"target": "<string>",
"delay": 5
},
"resume_flow": true
},
"languages": {
"default": "<string>",
"primary": "<string>"
},
"messages": {
"custom": {},
"errors": {}
},
"nodes": [
{
"config": {
"flow_id": "<string>",
"next_node": "<string>"
},
"id": "<string>",
"type": "FLOW",
"alias": "<string>",
"coordinates": {
"x": 0,
"y": 0
}
}
],
"start": {
"coordinates": {
"x": 0,
"y": 0
},
"hidden_fields": [
{
"key": "<string>",
"value": "<string>"
}
],
"next_node": "<string>"
},
"style": {
"css": "<string>"
},
"submitted_at": "2023-12-25",
"translations": {}
}Crear formulario
POST
https://{tenantDomain}/api/v2
/
forms
Go
package example
import (
context "context"
management "github.com/auth0/go-auth0/management/management"
client "github.com/auth0/go-auth0/management/management/client"
option "github.com/auth0/go-auth0/management/management/option"
)
func do() {
client := client.NewClient(
option.WithToken(
"<token>",
),
)
request := &management.CreateFormRequestContent{
Name: "name",
}
client.Forms.Create(
context.TODO(),
request,
)
}import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.forms.create({
name: "name",
});
}
main();import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.forms.create({
name: "name",
});
}
main();curl --request POST \
--url https://{tenantDomain}/api/v2/forms \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"ending": {
"after_submit": {
"flow_id": "<string>"
},
"resume_flow": true
},
"languages": {
"default": "<string>",
"primary": "<string>"
},
"messages": {
"custom": {},
"errors": {}
},
"nodes": [
{
"config": {
"flow_id": "<string>",
"next_node": "<string>"
},
"id": "<string>",
"type": "FLOW",
"alias": "<string>"
}
],
"start": {
"hidden_fields": [
{
"key": "<string>",
"value": "<string>"
}
],
"next_node": "<string>"
},
"style": {
"css": "<string>"
},
"translations": {}
}
'import requests
url = "https://{tenantDomain}/api/v2/forms"
payload = {
"name": "<string>",
"ending": {
"after_submit": { "flow_id": "<string>" },
"resume_flow": True
},
"languages": {
"default": "<string>",
"primary": "<string>"
},
"messages": {
"custom": {},
"errors": {}
},
"nodes": [
{
"config": {
"flow_id": "<string>",
"next_node": "<string>"
},
"id": "<string>",
"type": "FLOW",
"alias": "<string>"
}
],
"start": {
"hidden_fields": [
{
"key": "<string>",
"value": "<string>"
}
],
"next_node": "<string>"
},
"style": { "css": "<string>" },
"translations": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{tenantDomain}/api/v2/forms",
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([
'name' => '<string>',
'ending' => [
'after_submit' => [
'flow_id' => '<string>'
],
'resume_flow' => true
],
'languages' => [
'default' => '<string>',
'primary' => '<string>'
],
'messages' => [
'custom' => [
],
'errors' => [
]
],
'nodes' => [
[
'config' => [
'flow_id' => '<string>',
'next_node' => '<string>'
],
'id' => '<string>',
'type' => 'FLOW',
'alias' => '<string>'
]
],
'start' => [
'hidden_fields' => [
[
'key' => '<string>',
'value' => '<string>'
]
],
'next_node' => '<string>'
],
'style' => [
'css' => '<string>'
],
'translations' => [
]
]),
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;
}HttpResponse<String> response = Unirest.post("https://{tenantDomain}/api/v2/forms")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"ending\": {\n \"after_submit\": {\n \"flow_id\": \"<string>\"\n },\n \"resume_flow\": true\n },\n \"languages\": {\n \"default\": \"<string>\",\n \"primary\": \"<string>\"\n },\n \"messages\": {\n \"custom\": {},\n \"errors\": {}\n },\n \"nodes\": [\n {\n \"config\": {\n \"flow_id\": \"<string>\",\n \"next_node\": \"<string>\"\n },\n \"id\": \"<string>\",\n \"type\": \"FLOW\",\n \"alias\": \"<string>\"\n }\n ],\n \"start\": {\n \"hidden_fields\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"next_node\": \"<string>\"\n },\n \"style\": {\n \"css\": \"<string>\"\n },\n \"translations\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenantDomain}/api/v2/forms")
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 \"name\": \"<string>\",\n \"ending\": {\n \"after_submit\": {\n \"flow_id\": \"<string>\"\n },\n \"resume_flow\": true\n },\n \"languages\": {\n \"default\": \"<string>\",\n \"primary\": \"<string>\"\n },\n \"messages\": {\n \"custom\": {},\n \"errors\": {}\n },\n \"nodes\": [\n {\n \"config\": {\n \"flow_id\": \"<string>\",\n \"next_node\": \"<string>\"\n },\n \"id\": \"<string>\",\n \"type\": \"FLOW\",\n \"alias\": \"<string>\"\n }\n ],\n \"start\": {\n \"hidden_fields\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"next_node\": \"<string>\"\n },\n \"style\": {\n \"css\": \"<string>\"\n },\n \"translations\": {}\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"name": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"embedded_at": "2023-12-25",
"ending": {
"after_submit": {
"flow_id": "<string>"
},
"coordinates": {
"x": 0,
"y": 0
},
"redirection": {
"target": "<string>",
"delay": 5
},
"resume_flow": true
},
"languages": {
"default": "<string>",
"primary": "<string>"
},
"messages": {
"custom": {},
"errors": {}
},
"nodes": [
{
"config": {
"flow_id": "<string>",
"next_node": "<string>"
},
"id": "<string>",
"type": "FLOW",
"alias": "<string>",
"coordinates": {
"x": 0,
"y": 0
}
}
],
"start": {
"coordinates": {
"x": 0,
"y": 0
},
"hidden_fields": [
{
"key": "<string>",
"value": "<string>"
}
],
"next_node": "<string>"
},
"style": {
"css": "<string>"
},
"submitted_at": "2023-12-25",
"translations": {}
}Autorizaciones
bearerAuthoAuth2ClientCredentials
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Cuerpo
application/jsonapplication/x-www-form-urlencoded
Required string length:
1 - 150Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
- Option 1
- Option 2
- Option 3
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Respuesta
Form creado correctamente.
Maximum string length:
30Required string length:
1 - 150Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
- Option 1
- Option 2
- Option 3
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I