Base URLs
API requests can be made to the following base URLs depending on the environment:- Production:
https://onlyautomator.com
- Local Web App:
http://localhost:3000
- Local Microservice:
http://localhost:3001
Authentication
All proxy management endpoints require authentication using a bearer token passed in theAuthorization
header:
Endpoints Overview
Get Account Proxy
Retrieve the current configuration for a specific account.
Assign Automatic Proxy
Automatically assign a Webshare proxy to an account.
Set Manual Proxy
Manually configure a proxy provided by the user.
Set Preferences
Update preferences like region or activation status.
Disable Proxy
Disable the proxy configuration for an account.
Handle Failure
Report a failing proxy and optionally reassign.
Get Available Proxies
List available proxies directly from Webshare (Admin).
Get Client IP
Utility to check the client’s current external IP.
Endpoints
Get Account Proxy Configuration
Path Parameters
Parameter | Type | Description |
---|---|---|
accountId | string | The unique identifier of the account |
Response
Assign Automatic Proxy
Path Parameters
Parameter | Type | Description |
---|---|---|
accountId | string | The unique identifier of the account |
Request Body
Response
Set Manual Proxy
Path Parameters
Parameter | Type | Description |
---|---|---|
accountId | string | The unique identifier of the account |
Request Body
Response
Set Proxy Preferences
Path Parameters
Parameter | Type | Description |
---|---|---|
accountId | string | The unique identifier of the account |
Request Body
Response
Disable Proxy
Path Parameters
Parameter | Type | Description |
---|---|---|
accountId | string | The unique identifier of the account |
Response
Handle Proxy Failure
Path Parameters
Parameter | Type | Description |
---|---|---|
accountId | string | The unique identifier of the account |
Request Body
Response
Get Available Webshare Proxies
Query Parameters
Parameter | Type | Description |
---|---|---|
countryCode | string | Filter proxies by country code (optional) |
limit | integer | Maximum number of proxies to return (default: 10) |
Response
Utility Endpoints
Get Client IP
Response
Error Responses
All endpoints return standardized error responses:400 Bad Request
401 Unauthorized
404 Not Found
500 Server Error
Integration Examples
JavaScript Example (Assign Auto Proxy)
Python Example (Get Proxy Config)
Best Practices
- Security: Always keep your API tokens secure and never expose them in client-side code intended for end-users.
- Error Handling: Implement robust error handling for API responses, checking status codes and error messages.
- Proxy Usage: Avoid frequently changing proxies for the same account to maintain session validity.
- Rate Limiting: Be mindful of potential API rate limits when making multiple requests in quick succession.
- IP Validation: Use the
/api/whatsmyip
endpoint to verify proxy functionality after configuration or assignment.