Auth-Sessions
Validate AuthSession - Start
Start AuthSession validation.
POST
/
{workspaceId}
/
projects
/
{projectName}
/
auth-sessions
/
{authSessionId}
/
validate
/
start
ValidateAuthSessionStart
import { IntunedClient } from "@intuned/client";
const client = new IntunedClient({
workspaceId: "123e4567-e89b-12d3-a456-426614174000",
apiKey: process.env["INTUNED_API_KEY"] ?? "",
});
async function run() {
const result = await client.projects.authSessions.validate.start(
"my-project",
"<id>",
{
autoRecreate: true,
checkAttempts: 3,
},
);
console.log(result);
}
run();
from intuned_client import IntunedClient
from intuned_client import models
import os
with IntunedClient(
workspace_id="123e4567-e89b-12d3-a456-426614174000",
api_key=os.getenv("INTUNED_API_KEY", ""),
) as client:
res = client.projects.auth_sessions.validate.start(
project_name="my-project",
auth_session_id="auth-session-123",
body=models.AuthSessionsValidateStartRequestBody(
autoRecreate=True,
checkAttempts=3,
createAttempts=3,
),
)
print(res)curl --request POST \
--url https://app.intuned.io/api/v1/workspace/{workspaceId}/projects/{projectName}/auth-sessions/{authSessionId}/validate/start \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"id": "auth-session-123",
"checkAttempts": 3,
"createAttempts": 3,
"autoRecreate": true,
"proxy": "http://proxy.example.com:8080"
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: 'auth-session-123',
checkAttempts: 3,
createAttempts: 3,
autoRecreate: true,
proxy: 'http://proxy.example.com:8080'
})
};
fetch('https://app.intuned.io/api/v1/workspace/{workspaceId}/projects/{projectName}/auth-sessions/{authSessionId}/validate/start', 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://app.intuned.io/api/v1/workspace/{workspaceId}/projects/{projectName}/auth-sessions/{authSessionId}/validate/start",
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([
'id' => 'auth-session-123',
'checkAttempts' => 3,
'createAttempts' => 3,
'autoRecreate' => true,
'proxy' => 'http://proxy.example.com:8080'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <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://app.intuned.io/api/v1/workspace/{workspaceId}/projects/{projectName}/auth-sessions/{authSessionId}/validate/start"
payload := strings.NewReader("{\n \"id\": \"auth-session-123\",\n \"checkAttempts\": 3,\n \"createAttempts\": 3,\n \"autoRecreate\": true,\n \"proxy\": \"http://proxy.example.com:8080\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<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://app.intuned.io/api/v1/workspace/{workspaceId}/projects/{projectName}/auth-sessions/{authSessionId}/validate/start")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"auth-session-123\",\n \"checkAttempts\": 3,\n \"createAttempts\": 3,\n \"autoRecreate\": true,\n \"proxy\": \"http://proxy.example.com:8080\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.intuned.io/api/v1/workspace/{workspaceId}/projects/{projectName}/auth-sessions/{authSessionId}/validate/start")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"auth-session-123\",\n \"checkAttempts\": 3,\n \"createAttempts\": 3,\n \"autoRecreate\": true,\n \"proxy\": \"http://proxy.example.com:8080\"\n}"
response = http.request(request)
puts response.read_body{
"status": "pending",
"operationId": "aabbccddeeffggh"
}Authorizations
API Key used to authenticate your requests. How to create one.
Path Parameters
Your workspace ID. How to find it?
Body
application/json
Validate AuthSession input schema
⌘I
ValidateAuthSessionStart
import { IntunedClient } from "@intuned/client";
const client = new IntunedClient({
workspaceId: "123e4567-e89b-12d3-a456-426614174000",
apiKey: process.env["INTUNED_API_KEY"] ?? "",
});
async function run() {
const result = await client.projects.authSessions.validate.start(
"my-project",
"<id>",
{
autoRecreate: true,
checkAttempts: 3,
},
);
console.log(result);
}
run();
from intuned_client import IntunedClient
from intuned_client import models
import os
with IntunedClient(
workspace_id="123e4567-e89b-12d3-a456-426614174000",
api_key=os.getenv("INTUNED_API_KEY", ""),
) as client:
res = client.projects.auth_sessions.validate.start(
project_name="my-project",
auth_session_id="auth-session-123",
body=models.AuthSessionsValidateStartRequestBody(
autoRecreate=True,
checkAttempts=3,
createAttempts=3,
),
)
print(res)curl --request POST \
--url https://app.intuned.io/api/v1/workspace/{workspaceId}/projects/{projectName}/auth-sessions/{authSessionId}/validate/start \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"id": "auth-session-123",
"checkAttempts": 3,
"createAttempts": 3,
"autoRecreate": true,
"proxy": "http://proxy.example.com:8080"
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: 'auth-session-123',
checkAttempts: 3,
createAttempts: 3,
autoRecreate: true,
proxy: 'http://proxy.example.com:8080'
})
};
fetch('https://app.intuned.io/api/v1/workspace/{workspaceId}/projects/{projectName}/auth-sessions/{authSessionId}/validate/start', 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://app.intuned.io/api/v1/workspace/{workspaceId}/projects/{projectName}/auth-sessions/{authSessionId}/validate/start",
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([
'id' => 'auth-session-123',
'checkAttempts' => 3,
'createAttempts' => 3,
'autoRecreate' => true,
'proxy' => 'http://proxy.example.com:8080'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <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://app.intuned.io/api/v1/workspace/{workspaceId}/projects/{projectName}/auth-sessions/{authSessionId}/validate/start"
payload := strings.NewReader("{\n \"id\": \"auth-session-123\",\n \"checkAttempts\": 3,\n \"createAttempts\": 3,\n \"autoRecreate\": true,\n \"proxy\": \"http://proxy.example.com:8080\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<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://app.intuned.io/api/v1/workspace/{workspaceId}/projects/{projectName}/auth-sessions/{authSessionId}/validate/start")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"auth-session-123\",\n \"checkAttempts\": 3,\n \"createAttempts\": 3,\n \"autoRecreate\": true,\n \"proxy\": \"http://proxy.example.com:8080\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.intuned.io/api/v1/workspace/{workspaceId}/projects/{projectName}/auth-sessions/{authSessionId}/validate/start")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"auth-session-123\",\n \"checkAttempts\": 3,\n \"createAttempts\": 3,\n \"autoRecreate\": true,\n \"proxy\": \"http://proxy.example.com:8080\"\n}"
response = http.request(request)
puts response.read_body{
"status": "pending",
"operationId": "aabbccddeeffggh"
}