Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 25 additions & 3 deletions docs/captchas/alibaba-task.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,16 @@ import McpNotice from '@site/src/components/McpNotice';
<ImageWrap title="Slider">![](./images/alibaba-task/slider.png)</ImageWrap>
<ImageWrap title="Checkbox">![](./images/alibaba-task/checkbox.png)</ImageWrap>
</ImagesLayout>
<br />
**TRACELESS — невидимая проверка**

CapMonster Cloud также поддерживает Alibaba CAPTCHA `TRACELESS` — фоновую проверку без видимого задания, которая анализирует данные браузера, устройства и поведение пользователя.

Определить этот тип можно по `"CaptchaType": "TRACELESS"` в ответе на запрос загрузки капчи на вкладке **Network** в инструментах разработчика.

![](./images/alibaba-task/traceless.png)
<br />


:::warning **Внимание!**
CapMonster Cloud по умолчанию работает через встроенные прокси – они уже включены в стоимость. Указывать собственные прокси требуется только в тех случаях, когда сайт не принимает токен или доступ к встроенным сервисам ограничен.
Expand Down Expand Up @@ -143,9 +153,11 @@ CapMonster Cloud по умолчанию работает через встро

<ParamItem title="cookieRequired (внутри metadata)" type="boolean" />

Возвращает cookies вместе с результатом решения CAPTCHA.
Возвращает cookies вместе с результатом решения CAPTCHA.<br />
Используйте значение `true` для сайтов с **Alibaba WAF**, если после успешного прохождения проверки требуется получить cookies.
Наличие cookies `ssxmod_itna` и `ssxmod_itna2` — признак того, что на сайте используется **Alibaba WAF**, а не обычная CAPTCHA.

Используйте значение `true` только для сайтов, использующих **Alibaba WAF** или **Amazon WAF**, где после успешного прохождения проверки требуется получить cookies.
*см. подробнее в разделе [Как отличить Alibaba WAF от Alibaba CAPTCHA](#как-отличить-alibaba-waf-от-alibaba-captcha)*

По умолчанию параметр не используется.

Expand Down Expand Up @@ -194,6 +206,16 @@ CapMonster Cloud по умолчанию работает через встро

</div>

## Как отличить Alibaba WAF от Alibaba CAPTCHA

Наличие cookies `ssxmod_itna` и `ssxmod_itna2` указывает на использование Alibaba WAF. При обычной Alibaba CAPTCHA эти cookies отсутствуют.

Чтобы проверить их наличие, откройте **Инструменты разработчика** → **Application** → **Cookies** и выберите домен сайта.

![Cookies ssxmod_itna и ssxmod_itna2 во вкладке Application](./images/alibaba-task/alibaba-waf-cookies.png)

Если сайт использует Alibaba WAF и для дальнейших запросов нужны cookies, передайте `cookieRequired: true` в объекте `metadata` при создании задачи.

## Метод создания задачи

<MethodItem>
Expand Down Expand Up @@ -461,7 +483,7 @@ https://ru.api.capmonster.cloud/createTask

### Вариант с возвратом cookies (`cookieRequired`)

Для некоторых сайтов, использующих **Alibaba WAF** или **Amazon WAF**, после успешного решения необходимо получить cookies, которые затем используются при последующих запросах.
Для некоторых сайтов, использующих **Alibaba WAF**, после успешного решения необходимо получить cookies, которые затем используются при последующих запросах.

Для этого добавьте в объект `metadata` параметр:

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/captchas/images/alibaba-task/traceless.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/captchas/images/tendi/aid-encrypted.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
63 changes: 60 additions & 3 deletions docs/captchas/tendi.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,19 @@ CapMonster Cloud по умолчанию работает через встро

---

<ParamItem title="aidEncrypted (внутри metadata)" type="string" />

Параметр содержит значение Aid, которое необходимо получить с целевого сайта перед созданием задачи.

Пример: `HHuVfL451oAYXSwVa87xnU4QHER9ufsPpaSomCugX5Il/Nc2vLTu2dgoguMwmhAM`

**Важно**: данный параметр используется не на всех сайтах. Если сайт не возвращает Aid, `aidEncrypted` передавать не нужно.
Значение `aidEncrypted` является **одноразовым**: для каждой новой задачи необходимо получать новый Aid.

Подробнее см. в разделе [Как получить aidEncrypted](#как-получить-aidencrypted).

---

<ParamItem title="userAgent" type="string" />
User-Agent браузера. Используйте текущее значение, поддерживаемое CapMonster Cloud: `userAgentPlaceholder`<br />

Expand Down Expand Up @@ -126,6 +139,8 @@ https://ru.api.capmonster.cloud/createTask
Подробнее в разделе [createTask](/docs/api/methods/create-task/).

:::
<br />
Если на сайте используется `aidEncrypted`, передавайте его в `metadata`. Для каждой новой задачи получайте новое значение с сайта.

<Tabs className="full-width-tabs filled-tabs request-tabs" groupId="captcha-type">

Expand All @@ -142,7 +157,7 @@ https://ru.api.capmonster.cloud/createTask
"websiteKey": "your-website-key",
"userAgent": "userAgentPlaceholder",
"metadata": {
"captchaUrl": "https://global.captcha.example.com/TCaptcha-global.js"
"captchaUrl": "https://example.com/TCaptcha.js"
}
}
}
Expand Down Expand Up @@ -171,7 +186,7 @@ https://ru.api.capmonster.cloud/createTask
"websiteKey": "your-website-key",
"userAgent": "userAgentPlaceholder",
"metadata": {
"captchaUrl": "https://global.captcha.example.com/TCaptcha-global.js"
"captchaUrl": "https://example.com/TCaptcha.js"
},
"proxyType": "your-proxy-type",
"proxyAddress": "your-proxy-address",
Expand Down Expand Up @@ -263,14 +278,56 @@ https://ru.api.capmonster.cloud/getTaskResult

`*` в имени файла означает произвольную или пустую строку. Например, шаблон `TJNCaptcha*.js` может соответствовать файлам `TJNCaptcha.js` или `TJNCaptcha-global.js`.

## Как получить aidEncrypted

Если на сайте используется Aid, получите его отдельным запросом перед созданием задачи и передайте полученное значение в параметре `aidEncrypted` внутри объекта `metadata`.

Откройте **Инструменты разработчика**, перейдите на вкладку **Network** и активируйте CAPTCHA. Найдите запрос, с помощью которого сайт получает Aid, и скопируйте значение из ответа.

Пример адреса запроса:

```text
https://example.com/path/GetCaptchaAid.ashx?_=1234567890000
```

В этом же запросе также может передаваться значение `websiteKey` (`AppId`).

![](./images/tendi/aid-encrypted.png)

Адрес запроса и формат ответа зависят от конкретного сайта.

Пример создания задачи с параметром `aidEncrypted`:

```json
{
"clientKey": "API_KEY",
"task": {
"type": "CustomTask",
"class": "TenDI",
"websiteURL": "https://example.com/page-with-captcha",
"websiteKey": "YOUR_WEBSITE_KEY",
"metadata": {
"captchaUrl": "https://example.com/TCaptcha.js",
"aidEncrypted": "YOUR_AID_ENCRYPTED"
}
}
}
```

:::warning Важно:

Получайте новое значение Aid перед созданием каждой задачи. Не используйте повторно значение `aidEncrypted`, полученное для предыдущей задачи, и не используйте значения из примеров документации.

:::


## Как найти все нужные параметры для создания задачи на решение

### Автоматически

Для автоматизации поиска параметров их можно извлекать через **браузер** (обычный или headless, например, с **Playwright**) или напрямую из **HTTP-запросов**. Поскольку значения динамических параметров действуют недолго, их рекомендуется использовать сразу после получения.

:::warning **Важно!**
:::warning **Важно:**
Приведённые фрагменты кода являются базовыми примерами для ознакомления в извлечении необходимых параметров. Точная реализация будет зависеть от вашего сайта с капчей, его структуры и используемых HTML-элементов и селекторов.
:::

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,16 @@ Below are examples of Alibaba Captcha task types that are currently supported by
<ImageWrap title="Checkbox">![](./images/alibaba-task/checkbox.png)</ImageWrap>
</ImagesLayout>

<br />
**TRACELESS — invisible verification**

CapMonster Cloud also supports Alibaba CAPTCHA `TRACELESS` — a background check with no visible challenge that analyzes browser and device data, as well as user behavior.

You can identify this type by `"CaptchaType": "TRACELESS"` in the response to the CAPTCHA loading request in the **Network** tab of your browser’s developer tools.

![](./images/alibaba-task/traceless.png)
<br />

:::warning **Attention!**
CapMonster Cloud uses built-in proxies by default – their cost is already included in the service. You only need to specify your own proxies in cases where the website does not accept the token or access to the built-in services is restricted.

Expand Down Expand Up @@ -143,9 +153,11 @@ Example: `https://example.com:443//api/example/testlogin/_____tmd_____/punish?x5

<ParamItem title="cookieRequired (inside metadata)" type="boolean" />

Returns cookies together with the CAPTCHA solution.
Returns cookies together with the CAPTCHA solution.<br />
Use `true` for websites with **Alibaba WAF** if cookies are required after successful verification.
The presence of the `ssxmod_itna` and `ssxmod_itna2` cookies indicates that the website uses **Alibaba WAF** rather than a regular CAPTCHA.

Use `true` only for websites that use **Alibaba WAF** or **Amazon WAF** and require cookies after successful verification.
*For details, see [How to distinguish Alibaba WAF from Alibaba CAPTCHA](#how-to-distinguish-alibaba-waf-from-alibaba-captcha).*

By default, this parameter is not used.

Expand Down Expand Up @@ -194,6 +206,16 @@ You can get the latest value at: [https://capmonster.cloud/api/useragent/actual]

</div>

## How to distinguish Alibaba WAF from Alibaba CAPTCHA

The presence of the `ssxmod_itna` and `ssxmod_itna2` cookies indicates that the website uses Alibaba WAF. These cookies are absent when a regular Alibaba CAPTCHA is used.

To check for these cookies, open **Developer Tools** → **Application** → **Cookies** and select the website's domain.

![ssxmod_itna and ssxmod_itna2 cookies in the Application tab](./images/alibaba-task/alibaba-waf-cookies.png)

If the website uses Alibaba WAF and cookies are needed for subsequent requests, pass `cookieRequired: true` in the `metadata` object when creating the task.

## Create task method

### Standard variant (without additional parameters)
Expand Down Expand Up @@ -461,7 +483,7 @@ Alibaba Punish may use verification methods such as selecting matching images or

### Option with cookie return (`cookieRequired`)

For some websites using **Alibaba WAF** or **Amazon WAF**, cookies must be obtained after the CAPTCHA is successfully solved. These cookies are then used in subsequent requests.
For some websites using **Alibaba WAF**, cookies must be obtained after the CAPTCHA is successfully solved. These cookies are then used in subsequent requests.

To enable this, add the following parameter to the `metadata` object:

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
64 changes: 61 additions & 3 deletions i18n/en/docusaurus-plugin-content-docs/current/captchas/tendi.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,19 @@ If you are using a proxy with IP authorization, make sure to whitelist the addre

---

<ParamItem title="aidEncrypted (inside metadata)" type="string" />

This parameter contains the Aid value, which must be obtained from the target website before creating a task.

Example: `HHuVfL451oAYXSwVa87xnU4QHER9ufsPpaSomCugX5Il/Nc2vLTu2dgoguMwmhAM`

**Important**: this parameter is not used on all websites. If the website does not return Aid, you do not need to pass `aidEncrypted`.
The `aidEncrypted` value is **single-use**: a new Aid must be obtained for each new task.

For details, see [How to get aidEncrypted](#how-to-get-aidencrypted).

---

<ParamItem title="userAgent" type="string" />
Browser User-Agent. Use the current value supported by CapMonster Cloud: `userAgentPlaceholder`<br />

Expand Down Expand Up @@ -100,6 +113,8 @@ You can get the latest value at: [https://capmonster.cloud/api/useragent/actual]
</div>

## Create task method
If the website uses `aidEncrypted`, pass it in `metadata`. Obtain a new value from the website for each new task.

<Tabs className="full-width-tabs filled-tabs request-tabs" groupId="captcha-type">

<TabItem value="proxyless" label="CustomTask (without proxy)" default className="method-panel">
Expand All @@ -120,7 +135,7 @@ You can get the latest value at: [https://capmonster.cloud/api/useragent/actual]
"websiteKey": "your-website-key",
"userAgent": "userAgentPlaceholder",
"metadata": {
"captchaUrl": "https://global.captcha.example.com/TCaptcha-global.js"
"captchaUrl": "https://example.com/TCaptcha.js"
}
}
}
Expand Down Expand Up @@ -154,7 +169,7 @@ You can get the latest value at: [https://capmonster.cloud/api/useragent/actual]
"websiteKey": "your-website-key",
"userAgent": "userAgentPlaceholder",
"metadata": {
"captchaUrl": "https://global.captcha.example.com/TCaptcha-global.js"
"captchaUrl": "https://example.com/TCaptcha.js"
},
"proxyType": "your-proxy-type",
"proxyAddress": "your-proxy-address",
Expand Down Expand Up @@ -228,13 +243,56 @@ For the second version, files named `TJNCaptcha*.js` and `TJCaptcha*.js` may als

`*` in the filename represents any string or an empty string. For example, the pattern `TJNCaptcha*.js` can match files such as `TJNCaptcha.js` or `TJNCaptcha-global.js`.

## How to get aidEncrypted

If the website uses Aid, obtain it with a separate request before creating a task and pass the returned value in the `aidEncrypted` parameter inside the `metadata` object.

Open **Developer Tools**, go to the **Network** tab, and trigger the CAPTCHA. Find the request the website uses to obtain Aid and copy the value from the response.

Example request URL:

```text
https://example.com/path/GetCaptchaAid.ashx?_=1234567890000
```

The same request may also include the `websiteKey` (`AppId`) value.

![](./images/tendi/aid-encrypted.png)

The request URL and response format depend on the website.

Example of creating a task with the `aidEncrypted` parameter:

```json
{
"clientKey": "API_KEY",
"task": {
"type": "CustomTask",
"class": "TenDI",
"websiteURL": "https://example.com/page-with-captcha",
"websiteKey": "YOUR_WEBSITE_KEY",
"metadata": {
"captchaUrl": "https://example.com/TCaptcha.js",
"aidEncrypted": "YOUR_AID_ENCRYPTED"
}
}
}
```

:::warning Important:

Obtain a new Aid value before creating each task. Do not reuse an `aidEncrypted` value obtained for a previous task, and do not use values from the documentation examples.

:::


## How to find all required parameters for task creation

### Automatically

To automate parameter extraction, you can retrieve them via a **browser** (regular or headless, e.g., using **Playwright**) or directly from **HTTP requests**. Since dynamic parameter values are short-lived, it is recommended to use them immediately after retrieval.

:::warning **Important!**
:::warning **Important:**
The provided code snippets are basic examples for learning how to extract the required parameters. The exact implementation will depend on your captcha page, its structure, and the HTML elements and selectors used.
:::

Expand Down
Loading
Loading