Skip to Content
AnySolver logo
AnySolver
Token

PerimeterXHoldToken

Solve a PerimeterX Press & Hold block from the block payload through your proxy and get the PerimeterX cookies to replay.

PerimeterXHoldToken solves a PerimeterX Press & Hold challenge through your proxy. It takes the block payload from the block page and the cookies the session already holds, and returns the PerimeterX cookies (such as _px3) to set on the session.

PerimeterX shows that challenge on its block page when it wants a human to confirm the request.

Which PerimeterX task do I need?

What you haveTask
You see a block page with a Press & Hold button, and solve through your proxyPerimeterXHoldToken (this task)
You have the init.js URL and the app ID, and solve through your proxyPerimeterXInvisibleToken
You have only the app ID, and want the provider's invisible task, from the provider networkPerimeterXInvisibleTokenProxyLess
You have only the app ID, and want the provider's standard task, from the provider networkPerimeterXTokenProxyLess

Use your proxy

task.proxy is required on this task type. The provider solves from that address, and the proxy must keep one IP for the whole solve: see Keep the same IP for the whole solve. Request the block page, solve and replay the cookies from the same IP and with the same User-Agent: PerimeterX ties the cookies to the session that received the challenge.

Recognize a block

The block page is served for the request that PerimeterX stopped and defines page variables such as window._pxAppId, window._pxJsClientSrc, window._pxVid, window._pxUuid and window._pxHostUrl. The app ID is PX followed by letters and digits.

Build the request

Request the protected page through your proxy and keep the block response.

Read the block values from that response into one JSON object and pass it as the blockData string. It carries the app ID, the first-party script paths, vid, uuid and the blockScript path of the challenge script.

Pass the block mode of the response, for example xhr, as blockMode.

Pass the PerimeterX cookies the session already holds, such as _pxhd, as initCookies. Send {} if there are none.

Set solution.cookies on the session, send the returned userAgent as the User-Agent, and retry the blocked request.

blockData must be valid JSON. A task whose blockData is not valid JSON is rejected before it reaches a provider.

Check Provider stats for live success rates and solve times before you pick a provider.

Supported Providers

ProviderPrice per 1,000Routing
RiskBypass
$5.00

Request Schema

FieldTypeRequiredDescription
clientKey*
stringYes

Your API key. Create one in a workspace of the AnySolver dashboard.

Example: your-api-key-from-dashboard

task*
objectYes

The task body. Required fields depend on the task type. See Tasks for per-task schemas.

View task properties
settings
objectNo

Per-request settings for routing, Auto Retry, Auto Fallback, proxy reuse, response statistics and detailed analytics. Each field overrides the API key's value. See Routing modes.

View settings reference

Task Object Properties

The task field accepts an object with the following properties:

FieldTypeRequiredDescription
type*
Yes
websiteURL*
URLYes

Full URL of the page where the CAPTCHA is displayed.

Example: https://example.com/

blockMode*
stringYes

Block mode reported by the PerimeterX block response, for example xhr.

Example: xhr

blockData*
stringYes

PerimeterX block payload from the blocked response, as a JSON string. It carries the app ID (PX followed by letters and digits), the first-party script paths, vid, uuid and the blockScript path of the Press & Hold challenge.

Example: {"appId":"PXxxxxxxxx","jsClientSrc":"/xxxxx/init.js","firstPartyEnabled":true,"vid":"...","uuid":"...","hostUrl":"/xxxxx/xhr","blockScript":"/xxxxx/captcha/captcha.js?a=c&u=...&v=..."}

initCookies*
Record<string, unknown>Yes

PerimeterX cookies the session already holds, such as _pxhd, as a cookie name to value map. Send an empty object if there are none.

Example: {}

proxy*
string | objectYes

Proxy the provider solves through, as a string or an object. See Proxy configuration.

View proxy configuration

Example: http://user:pass@1.2.3.4:8080

{
    "clientKey": "YOUR_API_KEY",
    "task": {
        "type": "PerimeterXHoldToken",
        "websiteURL": "https://example.com/",
        "blockMode": "xhr",
        "blockData": "{\"appId\":\"PXxxxxxxxx\",\"jsClientSrc\":\"/xxxxx/init.js\",\"firstPartyEnabled\":true,\"vid\":\"...\",\"uuid\":\"...\",\"hostUrl\":\"/xxxxx/xhr\",\"blockScript\":\"/xxxxx/captcha/captcha.js?a=c&u=...&v=...\"}",
        "initCookies": {},
        "proxy": "http://user:pass@1.2.3.4:8080"
    }
}

Optional fields are not guaranteed across providers

Required fields are guaranteed across every provider that supports this task. Optional fields may be honored by some providers and silently ignored by others. AnySolver does not document per-provider parameter support, so before relying on an optional field, check that provider's own docs for the task you are using.

Response Schema

FieldTypeRequiredDescription
status*
Yes

Task status: "processing", "ready", or "failed".

Example: ready

errorId*
Yes

0 on success; 1 or 2 on an error. Branch on errorCode: Error IDs explains the two error groups.

Example: 0

taskId
stringNo

Unique identifier returned when the task was created.

Example: 01KFNDF328KAN2AJ3BNHCQYE88

errorCode
No

Machine-readable error code.

Example: CAPTCHA_UNSOLVABLE

errorDescription
stringNo

Human-readable error message with resolution hints.

Example: The captcha could not be solved.

cost
numberNo

Actual cost charged for this task in USD.

Example: 0.002

taskType
No

The type of CAPTCHA task to solve.

Example: ReCaptchaV2TokenProxyLess

provider
No

Provider that handled this task. While processing, the provider currently solving it.

Example: Multibot

solution
objectNo

Solution Object Properties

The solution field contains an object with the following properties:

FieldTypeRequiredDescription
cookies*
Record<string, unknown>Yes

PerimeterX cookies to set on the session, such as _px3. Replay them on the target with the same IP and User-Agent.

Example: {"_px3":"a1b2...","_pxhd":"c3d4..."}

userAgent*
stringYes

User-Agent string used during solving.

Example: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36

raw*
Record<string, unknown>Yes

Raw provider response data for advanced use cases.