Skip to content

Обновить учетные данные прокси-порта

PUT
/v2/proxy/{id}/update-credentials

Параметры

Параметры пути

id*

Proxy Port ID

Типinteger
Обязательный

Параметры запроса

apiKey

API key passed as a query parameter

Типstring

Тело запроса

JSON
{
"password": "password"
}

Ответы

Successful operation
application/json
JSON
{
"data": {...}
}

Примеры

cURL
curl -X PUT \
'https://api.asocks.com/v2/proxy/{id}/update-credentials' \
 -H "Content-Type: application/json"
JavaScript
fetch('https://api.asocks.com/v2/proxy/{id}/update-credentials', {method:'PUT',headers:{'Content-Type':'application/json'}})
  .then(response => response.json())
  .then(data => console.log(data));
PHP
<?php
$url = 'https://api.asocks.com/v2/proxy/{id}/update-credentials';
$method = 'PUT';
$headers = [
    'Content-Type' => 'application/json',
];

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$response = curl_exec($ch);
curl_close($ch);

echo $response;
?>
Python
import requests

url = 'https://api.asocks.com/v2/proxy/{id}/update-credentials'

headers = {
    'Content-Type': 'application/json'
}

response = requests.put(url, headers=headers)
print(response.json())