JavaScript
import Indices from 'indicesio';
const client = new Indices({
apiKey: process.env['INDICES_API_KEY'], // This is the default and can be omitted
});
const response = await client.tasks.startManualSession('id');
console.log(response.session_id);import os
from indices import Indices
client = Indices(
api_key=os.environ.get("INDICES_API_KEY"), # This is the default and can be omitted
)
response = client.tasks.start_manual_session(
id="id",
)
print(response.session_id)curl --request POST \
--url https://api.indices.io/v1beta/tasks/{id}/start-manual-session \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"use_proxy": false,
"cookies": [
{
"name": "<string>",
"value": "<string>",
"domain": "<string>",
"path": "<string>",
"secure": true,
"http_only": true
}
]
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.indices.io/v1beta/tasks/{id}/start-manual-session",
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([
'use_proxy' => false,
'cookies' => [
[
'name' => '<string>',
'value' => '<string>',
'domain' => '<string>',
'path' => '<string>',
'secure' => true,
'http_only' => true
]
]
]),
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.indices.io/v1beta/tasks/{id}/start-manual-session"
payload := strings.NewReader("{\n \"use_proxy\": false,\n \"cookies\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\",\n \"domain\": \"<string>\",\n \"path\": \"<string>\",\n \"secure\": true,\n \"http_only\": true\n }\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.indices.io/v1beta/tasks/{id}/start-manual-session")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"use_proxy\": false,\n \"cookies\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\",\n \"domain\": \"<string>\",\n \"path\": \"<string>\",\n \"secure\": true,\n \"http_only\": true\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.indices.io/v1beta/tasks/{id}/start-manual-session")
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 \"use_proxy\": false,\n \"cookies\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\",\n \"domain\": \"<string>\",\n \"path\": \"<string>\",\n \"secure\": true,\n \"http_only\": true\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"session_id": "<string>",
"iframe_url": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Tasks
Start a manual session
Spawn a browser session for manual task completion. If a session already exists, it will be closed and replaced.
POST
/
v1beta
/
tasks
/
{id}
/
start-manual-session
JavaScript
import Indices from 'indicesio';
const client = new Indices({
apiKey: process.env['INDICES_API_KEY'], // This is the default and can be omitted
});
const response = await client.tasks.startManualSession('id');
console.log(response.session_id);import os
from indices import Indices
client = Indices(
api_key=os.environ.get("INDICES_API_KEY"), # This is the default and can be omitted
)
response = client.tasks.start_manual_session(
id="id",
)
print(response.session_id)curl --request POST \
--url https://api.indices.io/v1beta/tasks/{id}/start-manual-session \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"use_proxy": false,
"cookies": [
{
"name": "<string>",
"value": "<string>",
"domain": "<string>",
"path": "<string>",
"secure": true,
"http_only": true
}
]
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.indices.io/v1beta/tasks/{id}/start-manual-session",
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([
'use_proxy' => false,
'cookies' => [
[
'name' => '<string>',
'value' => '<string>',
'domain' => '<string>',
'path' => '<string>',
'secure' => true,
'http_only' => true
]
]
]),
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.indices.io/v1beta/tasks/{id}/start-manual-session"
payload := strings.NewReader("{\n \"use_proxy\": false,\n \"cookies\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\",\n \"domain\": \"<string>\",\n \"path\": \"<string>\",\n \"secure\": true,\n \"http_only\": true\n }\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.indices.io/v1beta/tasks/{id}/start-manual-session")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"use_proxy\": false,\n \"cookies\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\",\n \"domain\": \"<string>\",\n \"path\": \"<string>\",\n \"secure\": true,\n \"http_only\": true\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.indices.io/v1beta/tasks/{id}/start-manual-session")
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 \"use_proxy\": false,\n \"cookies\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\",\n \"domain\": \"<string>\",\n \"path\": \"<string>\",\n \"secure\": true,\n \"http_only\": true\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"session_id": "<string>",
"iframe_url": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Enter your API key as the bearer token. Set header: Authorization to Bearer <api_key>
Path Parameters
The ID of the task to perform manually.
Body
application/json
⌘I