Create a new authentication profile
curl --request POST \
--url https://api.typeauth.com/{account_id}/authentication/create \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"ratelimit": {
"limit": 123,
"timeWindow": 123
},
"refill": {
"amount": 123
},
"remaining": 123,
"jwt_id": "<string>",
"expires": 123,
"byteLength": 123,
"tags": [
"<string>"
]
}
'import requests
url = "https://api.typeauth.com/{account_id}/authentication/create"
payload = {
"name": "<string>",
"ratelimit": {
"limit": 123,
"timeWindow": 123
},
"refill": { "amount": 123 },
"remaining": 123,
"jwt_id": "<string>",
"expires": 123,
"byteLength": 123,
"tags": ["<string>"]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
ratelimit: {limit: 123, timeWindow: 123},
refill: {amount: 123},
remaining: 123,
jwt_id: '<string>',
expires: 123,
byteLength: 123,
tags: ['<string>']
})
};
fetch('https://api.typeauth.com/{account_id}/authentication/create', 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.typeauth.com/{account_id}/authentication/create",
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>',
'ratelimit' => [
'limit' => 123,
'timeWindow' => 123
],
'refill' => [
'amount' => 123
],
'remaining' => 123,
'jwt_id' => '<string>',
'expires' => 123,
'byteLength' => 123,
'tags' => [
'<string>'
]
]),
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://api.typeauth.com/{account_id}/authentication/create"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"ratelimit\": {\n \"limit\": 123,\n \"timeWindow\": 123\n },\n \"refill\": {\n \"amount\": 123\n },\n \"remaining\": 123,\n \"jwt_id\": \"<string>\",\n \"expires\": 123,\n \"byteLength\": 123,\n \"tags\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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.typeauth.com/{account_id}/authentication/create")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"ratelimit\": {\n \"limit\": 123,\n \"timeWindow\": 123\n },\n \"refill\": {\n \"amount\": 123\n },\n \"remaining\": 123,\n \"jwt_id\": \"<string>\",\n \"expires\": 123,\n \"byteLength\": 123,\n \"tags\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.typeauth.com/{account_id}/authentication/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"ratelimit\": {\n \"limit\": 123,\n \"timeWindow\": 123\n },\n \"refill\": {\n \"amount\": 123\n },\n \"remaining\": 123,\n \"jwt_id\": \"<string>\",\n \"expires\": 123,\n \"byteLength\": 123,\n \"tags\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"data": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"domain": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"originHostname": "<string>",
"detailResponse": true,
"auth_id": "<string>",
"llmcache_id": "<string>",
"abuse_id": "<string>",
"tags": [
"<string>"
]
}
]
}Authentication
Create a new authentication profile
POST
/
{account_id}
/
authentication
/
create
Create a new authentication profile
curl --request POST \
--url https://api.typeauth.com/{account_id}/authentication/create \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"ratelimit": {
"limit": 123,
"timeWindow": 123
},
"refill": {
"amount": 123
},
"remaining": 123,
"jwt_id": "<string>",
"expires": 123,
"byteLength": 123,
"tags": [
"<string>"
]
}
'import requests
url = "https://api.typeauth.com/{account_id}/authentication/create"
payload = {
"name": "<string>",
"ratelimit": {
"limit": 123,
"timeWindow": 123
},
"refill": { "amount": 123 },
"remaining": 123,
"jwt_id": "<string>",
"expires": 123,
"byteLength": 123,
"tags": ["<string>"]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
ratelimit: {limit: 123, timeWindow: 123},
refill: {amount: 123},
remaining: 123,
jwt_id: '<string>',
expires: 123,
byteLength: 123,
tags: ['<string>']
})
};
fetch('https://api.typeauth.com/{account_id}/authentication/create', 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.typeauth.com/{account_id}/authentication/create",
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>',
'ratelimit' => [
'limit' => 123,
'timeWindow' => 123
],
'refill' => [
'amount' => 123
],
'remaining' => 123,
'jwt_id' => '<string>',
'expires' => 123,
'byteLength' => 123,
'tags' => [
'<string>'
]
]),
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://api.typeauth.com/{account_id}/authentication/create"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"ratelimit\": {\n \"limit\": 123,\n \"timeWindow\": 123\n },\n \"refill\": {\n \"amount\": 123\n },\n \"remaining\": 123,\n \"jwt_id\": \"<string>\",\n \"expires\": 123,\n \"byteLength\": 123,\n \"tags\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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.typeauth.com/{account_id}/authentication/create")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"ratelimit\": {\n \"limit\": 123,\n \"timeWindow\": 123\n },\n \"refill\": {\n \"amount\": 123\n },\n \"remaining\": 123,\n \"jwt_id\": \"<string>\",\n \"expires\": 123,\n \"byteLength\": 123,\n \"tags\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.typeauth.com/{account_id}/authentication/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"ratelimit\": {\n \"limit\": 123,\n \"timeWindow\": 123\n },\n \"refill\": {\n \"amount\": 123\n },\n \"remaining\": 123,\n \"jwt_id\": \"<string>\",\n \"expires\": 123,\n \"byteLength\": 123,\n \"tags\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"data": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"domain": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"originHostname": "<string>",
"detailResponse": true,
"auth_id": "<string>",
"llmcache_id": "<string>",
"abuse_id": "<string>",
"tags": [
"<string>"
]
}
]
}Path Parameters
Body
application/json
Name of the authentication profile
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Available options:
jwt, token Tags of the application
Maximum array length:
5Was this page helpful?
⌘I