Logo of «2Captcha»To home page
Captcha bypass tutorials

Was this helpful?

How to bypass reCAPTCHA v3 on Farfetch

Gregory Fisher
Gregory Fisher

Technical engineer

The account creation page on Farfetch (www.farfetch.com) is protected by an invisible reCAPTCHA v3. The main feature of working with this captcha is that it evaluates user behavior in the background and returns a token that must be correctly passed to the server.

For a successful solution, it is critically important to use the correct task type, select an appropriate minScore value, and inject the received token via the callback mechanism. It is also important to remember that proxies are not supported for reCAPTCHA v3 tasks in our service, so you must exclusively use the RecaptchaV3TaskProxyless task type.

Task Parameters

The RecaptchaV3TaskProxyless task type is used for solving.

Parameter Type Required Description
type String Yes Must be set to RecaptchaV3TaskProxyless
websiteURL String Yes Full URL of the page where the captcha is located
websiteKey String Yes Static site key (starts with 6L...)
minScore Float Yes Minimum required score (e.g., 0.3, 0.7, 0.9). If the token is not accepted by the site, change this value.
apiDomain String Yes API domain. Usually www.recaptcha.net or www.google.com is used
isEnterprise Boolean Yes Must be set to false for the standard version of reCAPTCHA v3

How to find parameters

  1. Open the Farfetch account creation page: https://www.farfetch.com/ and proceed to the registration form.
  2. Press F12 to open Developer Tools (DevTools) and go to the Network tab.
  3. Enable Preserve log.
  4. Fill out the form with test data and click the submit button to trigger the verification.
  5. In the Network tab filter, type recaptcha.
  6. Find the request to Google servers. In the parameters of this request or in the page source code (search for data-sitekey), you will find the websiteKey value.
  7. Copy the full URL from the browser address bar at the moment the request is sent. This will be your websiteURL.

Code Examples

Python + requests

Example of sending a task and polling for the result using the requests library.

python Copy
import requests
import time

API_KEY = 'YOUR_API_KEY'
WEBSITE_URL = 'https://www.farfetch.com/'
WEBSITE_KEY = '6LeifPcbAAAAAJaiPe_xgLTfnbdpEMAYJAAnVFJT'

url = 'https://api.2captcha.com/createTask'
headers = {
    'Content-Type': 'application/json',
    'X-API-Key': API_KEY
}
payload = {
    "clientKey": API_KEY,
    "task": {
        "type": "RecaptchaV3TaskProxyless",
        "websiteURL": WEBSITE_URL,
        "websiteKey": WEBSITE_KEY,
        "minScore": 0.3,
        "apiDomain": "www.recaptcha.net",
        "isEnterprise": False
    }
}

response = requests.post(url, headers=headers, json=payload)
result = response.json()

if result.get('errorId') == 0:
    task_id = result.get('taskId')
    print(f"Task created, ID: {task_id}")
    
    res_url = 'https://api.2captcha.com/getTaskResult'
    while True:
        time.sleep(5)
        
        res_payload = {
            "clientKey": API_KEY,
            "taskId": task_id
        }
        
        res_response = requests.post(res_url, headers=headers, json=res_payload).json()
        
        if res_response.get('errorId') == 0 and res_response.get('status') == 'ready':
            print("Captcha solved successfully!")
            token = res_response['solution']['gRecaptchaResponse']
            print(f"Token: {token}")
            break
        elif res_response.get('errorId') != 0:
            print(f"Error getting result: {res_response.get('errorDescription')}")
            break
else:
    print(f"Task creation error: {result.get('errorDescription')}")

Python + Playwright

Example of automation that extracts parameters, sends the task, and injects the token via callback.

python Copy
from playwright.sync_api import sync_playwright
import requests
import time

API_KEY = 'YOUR_API_KEY'
TARGET_URL = 'https://www.farfetch.com/'

def solve_farfetch_recaptcha_v3():
    with sync_playwright() as p:
        browser = p.chromium.launch(headless=False)
        page = browser.new_page()
        
        try:
            page.goto(TARGET_URL)
            # Actions to navigate to the registration form and fill data should go here
            # page.click('button[aria-label="Register"]')
            # page.fill('input[name="email"]', 'test@example.com')
            # page.click('button[type="submit"]')
            
            page.wait_for_selector('iframe[src*="recaptcha"]', timeout=10000)
            
            current_url = page.url
            website_key = page.evaluate("document.querySelector('[data-sitekey]')?.getAttribute('data-sitekey')")
            
            print(f"URL: {current_url}")
            print(f"Key: {website_key}")
            
            api_url = 'https://api.2captcha.com/createTask'
            headers = {'Content-Type': 'application/json', 'X-API-Key': API_KEY}
            payload = {
                "clientKey": API_KEY,
                "task": {
                    "type": "RecaptchaV3TaskProxyless",
                    "websiteURL": current_url,
                    "websiteKey": website_key,
                    "minScore": 0.3,
                    "apiDomain": "www.recaptcha.net",
                    "isEnterprise": False
                }
            }
            
            task_response = requests.post(api_url, headers=headers, json=payload).json()
            task_id = task_response.get('taskId')
            
            res_url = 'https://api.2captcha.com/getTaskResult'
            token = None
            for _ in range(20):
                time.sleep(5)
                res = requests.post(res_url, headers=headers, json={"clientKey": API_KEY, "taskId": task_id}).json()
                if res.get('status') == 'ready':
                    token = res['solution']['gRecaptchaResponse']
                    break
                if res.get('errorId') != 0:
                    print(f"API error: {res.get('errorDescription')}")
                    break
                    
            if token:
                print(f"Token received: {token[:30]}...")
                
                # Token injection via callback
                # The exact callback function name must be verified in the Farfetch page source code
                page.evaluate(f"""
                    if (typeof recaptchaCallback === 'function') {{
                        recaptchaCallback("{token}");
                    }} else {{
                        console.log("Callback function not found, trying alternative injection");
                        window.grecaptcha_response = "{token}";
                    }}
                """)
                print("Token passed via callback.")
            else:
                print("Failed to get token.")
                
        except Exception as e:
            print(f"Error: {e}")
        finally:
            # browser.close()

if __name__ == '__main__':
    solve_farfetch_recaptcha_v3()

How to use the received token (Injection via callback)

The Farfetch website uses a special JavaScript function (callback) to pass the received token. Unlike reCAPTCHA v2, where the token often automatically populates hidden form fields, here an explicit call to this function with the received value is required.

You can implement this in two ways:

  1. Use the standard approach with script injection that intercepts and calls the required callback, as described in our article: https://2captcha.com/h/recaptcha-v2-callback (the mechanism of injecting the token into the page context is universal).
  2. Use the alternative method of passing via callback, which is detailed in our official API documentation: https://2captcha.com/2captcha-api#callback

You need to examine the Farfetch page source code (Elements tab), find the exact function name in the data-callback attribute of the reCAPTCHA widget, and call exactly this function, passing the received token as an argument.

Important Notes

  • minScore tuning: If the website rejects the received token (server-side validation error), the first thing to do is change the minScore parameter in the API request. Try the values 0.1, 0.3, 0.5, 0.7, or 0.9 sequentially until the site starts accepting the tokens.
  • No proxy support: Proxies are not supported for reCAPTCHA v3 tasks in our service. Always use the RecaptchaV3TaskProxyless task type. If the site blocks your IP, configure the proxy at the browser level (Playwright/Selenium), not in the API task parameters.

Common Errors and Solutions

Error / Problem Cause Solution
Site rejects the token The minScore value does not match the site requirements. Change the minScore parameter in the API request. Try values 0.1, 0.3, 0.5, 0.7, or 0.9.
Proxy-related error Attempting to use proxies for reCAPTCHA v3. Proxies are not supported for reCAPTCHA v3. Always use the RecaptchaV3TaskProxyless task type.
ERROR_INVALID_SITE_KEY Invalid websiteKey or domain mismatch in websiteURL. Make sure the key starts with 6L and websiteURL exactly matches the address in the browser.
Token not accepted by the form Incorrect token injection method or wrong callback function name. Examine the page source code, find the exact function name in the data-callback attribute, and call it, passing the token.