cURL
curl --request PATCH \
--url https://cmd.illusory.io/v1/proxies/auth/basic/{proxyName} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"username": "john",
"password": "wick05"
}
'import requests
url = "https://cmd.illusory.io/v1/proxies/auth/basic/{proxyName}"
payload = {
"username": "john",
"password": "wick05"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({username: 'john', password: 'wick05'})
};
fetch('https://cmd.illusory.io/v1/proxies/auth/basic/{proxyName}', 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://cmd.illusory.io/v1/proxies/auth/basic/{proxyName}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'username' => 'john',
'password' => 'wick05'
]),
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://cmd.illusory.io/v1/proxies/auth/basic/{proxyName}"
payload := strings.NewReader("{\n \"username\": \"john\",\n \"password\": \"wick05\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://cmd.illusory.io/v1/proxies/auth/basic/{proxyName}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"username\": \"john\",\n \"password\": \"wick05\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://cmd.illusory.io/v1/proxies/auth/basic/{proxyName}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"username\": \"john\",\n \"password\": \"wick05\"\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"message": "Both username and password were updated.",
"data": {
"proxy_name": "ILL-US-AU1-9999",
"last_auth_change": "2050-12-04T17:43:16.407+00:00",
"username": "john",
"password": "wick05"
}
}{
"ok": false,
"data": {
"proxy_name": "ILL-US-AU1-9999"
},
"message": "Proxy not found"
}Proxy Authentication
Update Proxy Basic
Updates the basic authentication details of a proxy server.
PATCH
/
v1
/
proxies
/
auth
/
basic
/
{proxyName}
cURL
curl --request PATCH \
--url https://cmd.illusory.io/v1/proxies/auth/basic/{proxyName} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"username": "john",
"password": "wick05"
}
'import requests
url = "https://cmd.illusory.io/v1/proxies/auth/basic/{proxyName}"
payload = {
"username": "john",
"password": "wick05"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({username: 'john', password: 'wick05'})
};
fetch('https://cmd.illusory.io/v1/proxies/auth/basic/{proxyName}', 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://cmd.illusory.io/v1/proxies/auth/basic/{proxyName}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'username' => 'john',
'password' => 'wick05'
]),
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://cmd.illusory.io/v1/proxies/auth/basic/{proxyName}"
payload := strings.NewReader("{\n \"username\": \"john\",\n \"password\": \"wick05\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://cmd.illusory.io/v1/proxies/auth/basic/{proxyName}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"username\": \"john\",\n \"password\": \"wick05\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://cmd.illusory.io/v1/proxies/auth/basic/{proxyName}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"username\": \"john\",\n \"password\": \"wick05\"\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"message": "Both username and password were updated.",
"data": {
"proxy_name": "ILL-US-AU1-9999",
"last_auth_change": "2050-12-04T17:43:16.407+00:00",
"username": "john",
"password": "wick05"
}
}{
"ok": false,
"data": {
"proxy_name": "ILL-US-AU1-9999"
},
"message": "Proxy not found"
}Basic authentication secures your proxy with a username and password.
By default, all proxies upon deployment utilize a randomly generated basic authorization in the format of username:password.
Whitelist authorization will be disabled upon successfully updating basic authorization.
Authorizations
The Authorization header is used to authenticate with the API using your Master API key. Value is of the format Bearer YOUR_KEY_HERE.
Path Parameters
Replace {proxyName} in the url path with YOUR_PROXY.
Body
application/json
Basic authentication details
Was this page helpful?