10% off ALL new Proxies – CODE: 10pro

CapMonster Proxy Setup: Proxy-Matched Solving Guide

CapMonster Proxy Setup: Proxy-Matched Solving Guide

Direct Answer

To solve token-based captchas correctly with CapMonster Cloud, use the proxied RecaptchaV2Task and add your German mobile proxy via the proxyType, proxyAddress, proxyPort, proxyLogin and proxyPassword fields. The challenge is then worked through your IP — so the token matches the IP class you submit from and is accepted, instead of being rejected on an IP mismatch. Add your endpoint and credentials from your account.


The Mistake Most Guides Make

Most CapMonster examples reach for RecaptchaV2TaskProxyless: you let CapMonster solve on its own built-in proxies, then submit the token from your own proxy. For a modern token challenge (reCAPTCHA, hCaptcha, Cloudflare Turnstile) that split is exactly what makes a correctly solved token still fail — the token is minted on one IP class and submitted from another, and the site treats the mismatch as suspicious.

The fix is proxy-matched solving: use RecaptchaV2Task and hand CapMonster your German mobile proxy, so the challenge is worked on the same IP class your request uses. CapMonster's own documentation is explicit — if a token is not accepted by the target site, retry with your own proxies, and use the same proxy to solve the captcha and to submit the token.

A CAPTCHA solver and a trusted German mobile IP are complements, not substitutes: fewer challenges appear on a high-reputation mobile IP in the first place, and the ones that do can be solved proxy-matched. See what a CAPTCHA solver is and how a mobile proxy reduces CAPTCHAs.


Before You Start

You will need a CapMonster Cloud API key (the clientKey) and four values from your GermanProxy.io account:

  • Your CapMonster API key
  • Host and port of your endpoint
  • Username and password

The examples use PROXY_HOST, PORT, USER and PASS as placeholders — replace them with your own. GermanProxy.io supports HTTP, SOCKS5 and OpenVPN, so set proxyType to whichever your endpoint uses.

Install requests:

pip install requests

Step 1 — Create a Proxy-Matched Task

CapMonster's createTask endpoint takes a task object. Use RecaptchaV2Task — the proxied type — and add the proxy fields so the challenge is worked through your German mobile IP.

import requests

CLIENT_KEY = "YOUR_CAPMONSTER_API_KEY"

# Your German mobile proxy — the same endpoint your own requests use
PROXY_HOST = "PROXY_HOST"
PROXY_PORT = "PORT"
PROXY_USER = "USER"
PROXY_PASS = "PASS"

task = {
    "type":          "RecaptchaV2Task",          # proxied type, NOT ...Proxyless
    "websiteURL":    "https://www.example.de/login",
    "websiteKey":    "SITE_RECAPTCHA_SITEKEY",
    "userAgent":     "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36",
    "proxyType":     "http",                      # http | https | socks4 | socks5
    "proxyAddress":  PROXY_HOST,
    "proxyPort":     int(PROXY_PORT),
    "proxyLogin":    PROXY_USER,
    "proxyPassword": PROXY_PASS,
}

resp = requests.post(
    "https://api.capmonster.cloud/createTask",
    json={"clientKey": CLIENT_KEY, "task": task},
    timeout=30,
)
task_id = resp.json()["taskId"]
print("task id:", task_id)

websiteKey is the site's public reCAPTCHA sitekey from the page source. For the proxyless variant you would use RecaptchaV2TaskProxyless and drop the proxy fields — but that lets CapMonster pick its own built-in proxy, which cannot match your German mobile endpoint. For Cloudflare Turnstile the pattern is the same: swap the task type and keep the proxy fields so the challenge is worked on your IP.


Step 2 — Poll for the Token

Solving is asynchronous. Poll getTaskResult until status is ready; the token comes back in solution.gRecaptchaResponse. Poll no more often than every few seconds.

import time

def get_token(task_id):
    while True:
        r = requests.post(
            "https://api.capmonster.cloud/getTaskResult",
            json={"clientKey": CLIENT_KEY, "taskId": task_id},
            timeout=30,
        ).json()
        if r.get("status") == "ready":
            return r["solution"]["gRecaptchaResponse"]
        time.sleep(3)

token = get_token(task_id)
print("token:", token[:40], "...")

Step 3 — Submit the Token From the Same IP

The token is only half the job. Submit it to the site through the same German mobile proxy you gave CapMonster, so the mint IP and the submit IP share one IP class:

proxies = {
    "http":  f"http://{PROXY_USER}:{PROXY_PASS}@{PROXY_HOST}:{PROXY_PORT}",
    "https": f"http://{PROXY_USER}:{PROXY_PASS}@{PROXY_HOST}:{PROXY_PORT}",
}

resp = requests.post(
    "https://www.example.de/login",
    data={"g-recaptcha-response": token, "username": "...", "password": "..."},
    proxies=proxies,
    timeout=30,
)
print(resp.status_code)

For hCaptcha or Turnstile the flow is identical — the task type and the token field name change, but you still route the solve through your German mobile IP.


Verify the IP

Before you scale, confirm both sides really run on the same German mobile IP. Request an IP-echo endpoint through the proxy you gave CapMonster, and check it returns a German mobile IP — not your own address and not a datacenter range:

ip = requests.get("https://api.ipify.org?format=json", proxies=proxies, timeout=30)
print(ip.json())   # should be your German mobile IP

If it returns your own address, re-check the proxy URL and credentials. See test your mobile proxy setup and, for auth errors, fix 407 proxy authentication required.


Why Proxy-Matched Solving Matters

A token challenge does not only ask "was a human here" — it also weighs where the token was minted. When CapMonster solves on its own built-in proxy and you submit from a mobile IP, the site sees two different IP classes for one session. That inconsistency is a common reason a technically correct token is still rejected.

Proxy-matched solving removes it: the solve and the submit both happen on your dedicated German mobile connection, so the session reads as one continuous user. Hold the endpoint as a sticky session across the solve-and-submit sequence, and rotate on demand only between independent tasks. If you are already seeing blocks before any captcha, see fix 403 Forbidden when scraping.


Why a Mobile IP Reduces CAPTCHAs at All

The best captcha is the one that never appears. Real German mobile IPs (4G/5G) sit behind CGNAT — carrier-grade NAT, where many real subscribers share one public IPv4 address (how CGNAT works). Because a single mobile IP fronts a crowd of ordinary users, sites cannot cheaply treat it as "one bot" the way they treat a lone datacenter IP, so a mobile IP tends to carry higher IP reputation and draws fewer challenges.

That is the division of labour: a trusted mobile IP keeps challenge volume low, and CapMonster handles the residual challenges proxy-matched. For the wider picture, see mobile vs residential vs datacenter proxies and how websites detect proxies.


Scrape Responsibly

A CAPTCHA solver is for legitimate access to data you are permitted to collect — not for defeating security controls you have no right to touch. Keep your pipeline clean and defensible:

  1. Respect robots.txt and each site's terms of service, and operate only where you are permitted.
  2. Collect public data and send requests at a human-reasonable rate — add delays, don't hammer servers.
  3. Handle any personal data in line with the GDPR — collect only what you need.
  4. Solve captchas for legitimate access, not to circumvent access controls or platform rules.

These habits keep both your data and your IP reputation healthy. See is web scraping legal in the EU and are mobile proxies legal.


FAQ

Why does my CapMonster token still get rejected after a good solve?

Usually an IP mismatch. If CapMonster works the token on its own built-in proxy but you submit from a mobile IP, the site sees two IP classes for one session and can reject the token. Use RecaptchaV2Task and pass your own German mobile proxy so both sides match.

Which CapMonster task type do I use with my own proxy?

RecaptchaV2Task — the proxied type — and supply the proxy fields. RecaptchaV2TaskProxyless uses CapMonster's built-in proxies instead, which cannot match your German mobile endpoint.

Which proxy types does CapMonster accept?

http, https, socks4 and socks5, with a login and password. Set the type in proxyType and your endpoint in proxyAddress and proxyPort — CapMonster then solves through your German mobile IP.

Does a mobile IP mean CapMonster has less to do?

Often, yes. A real German mobile IP on a CGNAT range carries higher IP reputation than a datacenter IP, so many sites challenge it less. CapMonster then handles only the residual challenges, proxy-matched. For the mechanism, see reduce CAPTCHAs with mobile proxies.

Is solving a captcha to reach a site allowed?

Solve captchas only for legitimate access to data you are permitted to collect — check terms of service and robots.txt first. A solver is not a way to defeat security controls you have no right to touch.

HTTP or SOCKS5 for the proxy I give CapMonster?

Either. Set proxyType to http or socks5 to match your endpoint. For most reCAPTCHA and Turnstile work, HTTP is the simplest choice. Using Anti-Captcha or CapSolver instead? See Anti-Captcha with a German mobile proxy and CapSolver with a German mobile proxy.


CTA

Solve the residual captchas proxy-matched, on an IP that draws fewer of them to begin with. Get your German mobile endpoint — HTTP/SOCKS5/OpenVPN, sticky sessions, on-demand rotation, fair-use 20 GB/day, from a transparent EU provider.


Get a German mobile proxy: Real 4G/5G IPs from Germany, fair-use 20 GB/day — browse German mobile proxy plans or get a dedicated proxy on the Blue network.

Telegram Support
Nach oben scrollen