ThreatMetrixToken
Run a ThreatMetrix device profile for a session ID through your own proxy and get the profiling cookies. With the schema, an example and provider prices.
ThreatMetrixToken runs the ThreatMetrix device profiling for the session ID you send, through your proxy, and returns the profiling cookies. ThreatMetrix profiles the visitor's browser with a script on the page, and the site later asks ThreatMetrix about the profile that belongs to a session ID. Running the profiling for your session ID makes the site find a profile for that session.
Use your proxy
task.proxy is required on this task type, and the provider solves from that address. The proxy must keep one IP for the whole solve: see Keep the same IP for the whole solve. Submit to the site from the same address, and use the returned solution.userAgent for the requests that follow.
Find the parameters
Open the page with DevTools and the Network tab and look for the profiling script request, which has org_id and session_id query parameters, for example https://{host}/fp/tags.js?org_id=...&session_id=...:
orgIdis theorg_idvalue.sessionIdis thesession_idvalue. The site generates it per session, so read it from the page or create it the same way the site does, and send the same value to the site afterwards.customDomainis the host that serves the script, such astm.example.com.pageIdis the page identifier the site sets for the profiling tag (thepageidof the profiling snippet).titleis the page'sdocument.title.
Use the result
solution.sessionId is the session ID that was profiled. Submit that ID where the site expects its session ID, and set solution.cookies on the session.
Check Provider stats for live success rates and solve times before you pick a provider.
Supported Providers
| Provider | Price per 1,000 | Routing |
|---|---|---|
RiskBypass | $3.00 |
Request Schema
| Field | Type | Required | Description |
|---|---|---|---|
clientKey* | string | Yes | Your API key. Create one in a workspace of the AnySolver dashboard. Example: |
task* | object | Yes | The task body. Required fields depend on the task type. See Tasks for per-task schemas. View task properties |
settings | object | No | 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:
| Field | Type | Required | Description |
|---|---|---|---|
type* | Yes | ||
websiteURL* | URL | Yes | Full URL of the page where the CAPTCHA is displayed. Example: |
orgId* | string | Yes | ThreatMetrix organization ID: the Example: |
pageId* | string | Yes | ThreatMetrix page ID: the tag identifier the site uses for this page (the Example: |
sessionId* | string | Yes | ThreatMetrix session ID the page profiles: the Example: |
customDomain* | string | Yes | Domain the site loads the ThreatMetrix profiling script from: the host of the profiling script request, for example Example: |
title* | string | Yes | Title of the target page ( Example: |
proxy* | string | object | Yes | Proxy the provider solves through, as a string or an object. See Proxy configuration. View proxy configurationExample: |
{
"clientKey": "YOUR_API_KEY",
"task": {
"type": "ThreatMetrixToken",
"websiteURL": "https://example.com/login",
"orgId": "abcd1234",
"pageId": "1",
"sessionId": "3029471b-4b25-41cd-8d78-46598448325e",
"customDomain": "tm.example.com",
"title": "Log in",
"proxy": "http://user:pass@1.2.3.4:8080"
}
}Optional fields are not guaranteed across providers
Response Schema
| Field | Type | Required | Description |
|---|---|---|---|
status* | Yes | Task status: "processing", "ready", or "failed". Example: | |
errorId* | Yes |
Example: | |
taskId | string | No | Unique identifier returned when the task was created. Example: |
errorCode | No | Machine-readable error code. Example: | |
errorDescription | string | No | Human-readable error message with resolution hints. Example: |
cost | number | No | Actual cost charged for this task in USD. Example: |
taskType | No | The type of CAPTCHA task to solve. Example: | |
provider | No | Provider that handled this task. While processing, the provider currently solving it. Example: | |
solution | object | No |
Solution Object Properties
The solution field contains an object with the following properties:
| Field | Type | Required | Description |
|---|---|---|---|
sessionId* | string | Yes | The session ID that was profiled. Submit it where the site expects its session ID. Example: |
cookies* | Record<string, unknown> | Yes | Cookies set by the ThreatMetrix profiling session. Replay them with the same IP and User-Agent. Example: |
userAgent* | string | Yes | User-Agent string used during solving. Example: |
raw* | Record<string, unknown> | Yes | Raw provider response data for advanced use cases. |