POST
/
api
/
proxy
/
account
/
{accountId}
/
set-manual
Set Manual Proxy
curl --request POST \
  --url https://onlyautomator.com/api/proxy/account/{accountId}/set-manual \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "proxy_address": "proxy.example.com",
  "proxy_port": 8888,
  "proxy_username": "manualUser",
  "proxy_password": "manualPass123",
  "proxy_country_code": "GB"
}'
{
  "data": {
    "proxy_address": "192.168.1.100",
    "proxy_port": 3128,
    "proxy_username": "my_manual_user",
    "proxy_country_code": "DE",
    "proxy_mode": "manual",
    "proxy_assigned_at": "2023-09-16T10:00:00Z",
    "message": "Manual proxy configured successfully"
  }
}

Set Manual Proxy

This endpoint allows users to manually configure a specific proxy for their OnlyFans account, overriding any automatic assignment. The provided configuration undergoes a connectivity check before being saved.

Authentication

This endpoint requires authentication via bearer token representing a valid user session managed by Supabase Auth (cookies).Testing Note: Due to the requirement for a live user session, this endpoint cannot be successfully tested directly using the ‘Send’ button in this documentation with a static token.To test:
  1. Call this endpoint from your web application after logging in.
  2. Use curl or a similar tool with a valid, current user JWT obtained from your browser’s session after logging in.
Retrieving JWT Token for Testing: To test endpoints requiring a user session with tools like curl, you need the JWT access token stored by Supabase Auth in your browser.
  1. Log in to your application normally in your browser.
  2. Open Developer Tools (usually F12).
  3. Go to the Application tab (it might be called Storage in Firefox).
  4. Under the Storage section, find Cookies and select your application’s domain (e.g., http://localhost:3000 or https://onlyautomator.com).
  5. Look for a cookie named similar to sb-access-token (the exact name might vary slightly based on Supabase configuration).
  6. Copy the entire value of this cookie. This is your Bearer token.
  7. Use this copied value in the Authorization: Bearer <your_copied_token> header for your curl or other API tool requests.
Note: This token has a limited lifetime and you’ll need to copy a fresh one after it expires.

Response Example

{
  "data": {
    "proxy_address": "192.168.1.100",
    "proxy_port": 3128,
    "proxy_username": "my_manual_user", // Password is not returned
    "proxy_country_code": "DE",
    "proxy_mode": "manual",
    "proxy_assigned_at": "2023-09-16T10:00:00Z",
    "message": "Manual proxy configured successfully"
  }
}

Error Codes

This table provides context beyond the basic OpenAPI status codes.
Status CodeDescription
400Missing required fields (address, port, username, password) in request body or invalid format.
400The provided proxy failed the connectivity check (reason specified in the error message).
401Authentication token is missing or invalid.
404The specified accountId does not exist.
500An internal server error occurred (e.g., database update failed, password encryption failed).

Code Examples

// Using fetch
const setManualProxy = async (accountId, apiToken, config) => {
  const response = await fetch(`https://onlyautomator.com/api/proxy/account/${accountId}/set-manual`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'Authorization': `Bearer ${apiToken}`
    },
    body: JSON.stringify(config)
  });
  
  if (!response.ok) {
     const errorData = await response.json();
     throw new Error(`API Error (${response.status}): ${errorData.error}`);
  }
  return await response.json();
};

// Example usage
const manualConfig = {
  proxy_address: 'proxy.example.com',
  proxy_port: 8888,
  proxy_username: 'manualUser',
  proxy_password: 'manualPass123', // Send the password
  proxy_country_code: 'GB'
};

setManualProxy('acc123', 'your_api_token', manualConfig)
  .then(data => console.log('Manual setup result:', data))
  .catch(error => console.error('Error setting manual proxy:', error));

Notes

  • A connectivity check is performed before saving the configuration.
  • The provided proxy_password is stored encrypted and is not returned in the response.
  • Successfully setting a manual proxy updates the account’s proxy_mode to manual and ensures proxy_is_active is true.
  • Any existing proxy_id from automatic assignment is cleared.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Authorization
string
required

Bearer token for authentication (JWT)

Path Parameters

accountId
string<uuid>
required

The unique identifier of the OnlyFans account.

Body

application/json
proxy_address
string
required
Example:

"proxy.example.com"

proxy_port
integer
required
Example:

8888

proxy_username
string
required
Example:

"manualUser"

proxy_password
string<password>
required
Example:

"manualPass123"

proxy_country_code
string | null
Example:

"GB"

Response

Manual proxy configured successfully.

data
object