Skip to main content
GET
/
api
/
proxy
/
webshare
/
available-countries
Get Available Proxy Countries
curl --request GET \
  --url https://onlyautomator.com/api/proxy/webshare/available-countries \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "data": [
    {
      "code": "US",
      "name": "United States",
      "region": "North America"
    },
    {
      "code": "DE",
      "name": "Germany",
      "region": "Europe"
    },
    {
      "code": "GB",
      "name": "United Kingdom",
      "region": "Europe"
    }
    // ... more countries
  ]
}

Overview

This endpoint provides a list of countries for which OnlyAutomator can potentially assign Webshare proxies. This list is typically used to populate dropdowns or selection interfaces where users can indicate a preferred region for automatic proxy assignment. The data might be sourced directly from Webshare or from a cached list maintained by the backend.
This endpoint requires specific permissions and might expose sensitive information about the available proxy pool. It should typically only be accessible to administrators or internal services.
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.

Responses

The response contains an array of available countries, each with its code, name, and region.
{
  "success": true,
  "data": [
    {
      "code": "US",
      "name": "United States",
      "region": "North America"
    },
    {
      "code": "DE",
      "name": "Germany",
      "region": "Europe"
    },
    {
      "code": "GB",
      "name": "United Kingdom",
      "region": "Europe"
    }
    // ... more countries
  ]
}

Response Data Structure

The data array contains objects with the following properties:
  • code: (string) The two-letter ISO 3166-1 alpha-2 country code.
  • name: (string) The full name of the country.
  • region: (string) The general geographical region of the country.

Authorizations

Authorization
string
header
required

Standard user JWT token for authentication.

Headers

Authorization
string
required

Bearer token for authentication (JWT)

Response

List of available countries retrieved successfully.

success
boolean
Example:

true

data
object[]