POST

API health

24h health
Normal
  • Healthy / normal
  • Available
Normal

Last 24 hours

Last 30 days

EverySolve's Alibaba CAPTCHA API returns a token for your challenge workflow.Alibaba Cloud CAPTCHA can appear as a click-through, slider, puzzle, or other risk-adaptive widget; it is not Alibaba's separate page-level shield. The returned token belongs to the widget verification flow; do not treat it as a page-access cookie.

Send POST https://api.everyinfra.com/api/v1/captcha with type set to alibaba. Put the parameters in the request body, at the same level as type. $1.25 per 1,000 successful solutions ($0.00125 per successful solve). Failed calls and empty results are not charged.

AI prompt

#
Help me write a script that calls the EveryInfra "Alibaba CAPTCHA" API.

API contract:
- Request: POST https://api.everyinfra.com/api/v1/captcha with the header Authorization: Bearer <API Key>. Read the key from the EVERYINFRA_API_KEY environment variable; do not put it in the code.
- In the request body, set type to alibaba and put the parameters next to it at the same level.
- Required parameters:
  - website_url: The exact page where this challenge appears, including the relevant path rather than only the site home page.
  - scene_id: The scene ID the target page passes to initAliyunCaptcha as SceneId.
  - prefix: The Alibaba Cloud CAPTCHA 2.0 identity prefix from the page's window.AliyunCaptchaConfig; it is also the first label of the <prefix>.captcha-open.aliyuncs.com verification host.
- Optional parameters:
  - region: The region in the page's AliyunCaptchaConfig, cn or sgp. It sets the deviceToken format in the returned token: WEB# for cn, SG_WEB# for sgp. (allowed values: cn / sgp)
- Example request body:
{
  "type": "alibaba",
  "website_url": "<website_url>",
  "scene_id": "<scene_id>",
  "prefix": "<prefix>"
}
- Billing: $1.25 per 1,000 successful solutions ($0.00125 per successful solve). Failed calls and empty results are not charged.
- On 422, fix the parameters using the suggestions and allowed values in the error. On 429 or 503, wait for Retry-After and try again.

Before writing code, ask me how many items I need to process and what format to save the results in, then confirm the plan and the rough cost with me.

Request parameters

#
NameInTypeRequiredDefaultDescription
AuthorizationheaderstringYes-Bearer followed by your API key. Create it in the console; never put it in a URL or a code repository.
typebodystringYesalibabaCAPTCHA type, fixed value.
website_urlbodystringYes-The exact page where this challenge appears, including the relevant path rather than only the site home page.
scene_idbodystringYes-The scene ID the target page passes to initAliyunCaptcha as SceneId.
prefixbodystringYes-The Alibaba Cloud CAPTCHA 2.0 identity prefix from the page's window.AliyunCaptchaConfig; it is also the first label of the <prefix>.captcha-open.aliyuncs.com verification host.
regionbodystring (enum)No-The region in the page's AliyunCaptchaConfig, cn or sgp. It sets the deviceToken format in the returned token: WEB# for cn, SG_WEB# for sgp.Allowed valuescnsgp

Code samples

#
bash
curl -X POST 'https://api.everyinfra.com/api/v1/captcha' \
  -H "Authorization: Bearer $EVERYINFRA_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "type": "alibaba",
  "website_url": "<website_url>",
  "scene_id": "<scene_id>",
  "prefix": "<prefix>"
}'

OpenAPI definition (JSON)Samples read the key from the EVERYINFRA_API_KEY environment variable; copied code never contains your key.

Response example

#
No sample response is available for these parameters yet. This preview shows the response shape and fields from the API definition, with … as placeholders; it is not the result of a live call.
json
{  "id": "req_…",  "type": "alibaba",  "solution": {    "token": "…"  },  "billing": {    "charged": …,    "charged_usd": …,    "balance_after_usd": …,    …  },  "quota": { … }}

Where the Alibaba CAPTCHA parameters come from

#

website_url is the page containing the widget. Copy scene_id from the SceneId passed to initAliyunCaptcha and prefix from window.AliyunCaptchaConfig on that page; region (cn or sgp) is optional and comes from the same config.

Code to find these values on the page

alibaba-1.js
// 2.0: global config and scene ID
[ window.AliyunCaptchaConfig,                                  // {region:'cn', prefix:'xxxx'}
  window.AliyunCaptchaConfig?.prefix,                          // identity prefix → send as prefix (appkey in 1.0)
  document.documentElement.innerHTML.match(/SceneId["'\s:=]{1,4}["']([A-Za-z0-9]{4,16})["']/), // scene ID → send as scene_id (scene in 1.0)
  document.querySelector('#captcha-element'),                  // default container id
  [...document.scripts].map(s=>s.src).filter(s=>/AliyunCaptcha\.js|captcha-frontend/i.test(s)) ]

// 1.0: global AWSC with appkey and scene
[ typeof window.AWSC,
  document.documentElement.innerHTML.match(/appkey["'\s:=]{1,4}["']([\w-]+)["']/),
  document.documentElement.innerHTML.match(/\bscene["'\s:=]{1,4}["']([\w-]+)["']/),
  [...document.scripts].map(s=>s.src).filter(s=>/g\.alicdn\.com\/AWSC/.test(s)) ]

How to recognize Alibaba CAPTCHA

#

Alibaba Cloud CAPTCHA can appear as a click-through, slider, puzzle, or other risk-adaptive widget; it is not Alibaba's separate page-level shield.

What makes Alibaba CAPTCHA different

The returned token belongs to the widget verification flow; do not treat it as a page-access cookie.

How to use the Alibaba CAPTCHA API

#

The Alibaba CAPTCHA API returns a token in token. Its solution format is token. Submit the token in the field or verification request expected by the target workflow.

  1. 01Read GET /api/v1/captcha/types and select the alibaba entry.
  2. 02Send type: "alibaba" and the required parameters to POST /api/v1/captcha.
  3. 03Read a token from token.
  4. 04Submit the token in the field or verification request expected by the target workflow.

Billing and availability EverySolve charges only when a solution is delivered successfully. An unsuccessful attempt is not charged, and any held amount goes back to your balance automatically. Read available and the price fields from GET /api/v1/captcha/types at request time rather than treating them as static page content.

Alibaba CAPTCHA integration questions

#

How can I identify Alibaba CAPTCHA before choosing a type?

Alibaba Cloud CAPTCHA can appear as a click-through, slider, puzzle, or other risk-adaptive widget; it is not Alibaba's separate page-level shield. Use alibaba only after those signals match the target challenge.

Which target-page values belong in Alibaba CAPTCHA requests?

website_url is the page containing the widget. Copy scene_id from the SceneId passed to initAliyunCaptcha and prefix from window.AliyunCaptchaConfig on that page; region (cn or sgp) is optional and comes from the same config. Provide website_url, scene_id, and prefix. Optional parameters are region.

What does Alibaba CAPTCHA return, and what is easy to confuse it with?

The Alibaba CAPTCHA API returns a token in token. Its solution format is token. The returned token belongs to the widget verification flow; do not treat it as a page-access cookie.

Which external source explains the Alibaba CAPTCHA integration?

Alibaba Cloud's CAPTCHA documentation explains the client-side widget and server verification flow. [Open the Alibaba CAPTCHA reference](https://help.aliyun.com/zh/captcha/). EverySolve-specific fields and live availability still come from the type catalog.

Reference for Alibaba CAPTCHA

#
#

All CAPTCHA types

Errors and billing

#
401
Missing or invalid key.
402
Insufficient balance. Top up first.
422
Invalid parameter name or value. Fix it using the suggestions in the error. No charge.
429
Per-minute request limit reached. Wait for Retry-After, then try again.
503
Could not complete. The held charge is returned to your balance. If the outcome is unknown, verify it before you retry.
200 empty
No data. No charge.

Errors

Google Analytics needs consent. Privacy