Tokenwave RU Open the bot
Home›API›Methods

createTask

Create a task

#Description

This method creates a captcha-solving task. The parameters contain the client key and the task description (the captcha type and its data).

Method URL
POSThttps://api.tokenwave.org/createTask

Request format: JSON POST

#Request parameters

clientKeystringrequired
Your API key: 32 characters (digits and letters a–f). You get it in the bot with the My key button and pass it in every request.
Example: 67b6bcbb1a728ea8d563de6d169a2057
taskobjectrequired
An object describing the task: the captcha type, the page address, the key and the session parameters. All fields are described in the HCaptchaTask section.

#Request example

curl -X POST https://api.tokenwave.org/createTask \
  -H "Content-Type: application/json" \
  -d '{
    "clientKey": "YOUR_API_KEY",
    "task": {
      "type": "HCaptchaTask",
      "websiteURL": "https://store.steampowered.com/join/",
      "websiteKey": "e18a349a-46c2-46a0-87a8-74be79345c92",
      "data": "14233456855421534",
      "isInvisible": true,
      "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/153.0.0.0 Safari/537.36",
      "cookies": "sessionid=0123456789abcdef01234567; browserid=1234567890123456789"
    }
  }'
import requests

resp = requests.post("https://api.tokenwave.org/createTask", json={
    "clientKey": "YOUR_API_KEY",
    "task": {
        "type": "HCaptchaTask",
        "websiteURL": "https://store.steampowered.com/join/",
        "websiteKey": "e18a349a-46c2-46a0-87a8-74be79345c92",
        "data": "14233456855421534",
        "isInvisible": True,
        "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/153.0.0.0 Safari/537.36",
        "cookies": "sessionid=0123456789abcdef01234567; browserid=1234567890123456789",
    },
}).json()
print(resp)
const resp = await fetch("https://api.tokenwave.org/createTask", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    clientKey: "YOUR_API_KEY",
    task: {
      type: "HCaptchaTask",
      websiteURL: "https://store.steampowered.com/join/",
      websiteKey: "e18a349a-46c2-46a0-87a8-74be79345c92",
      data: "14233456855421534",
      isInvisible: true,
      userAgent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/153.0.0.0 Safari/537.36",
      cookies: "sessionid=0123456789abcdef01234567; browserid=1234567890123456789",
    },
  }),
}).then((r) => r.json());
console.log(resp);

See how to find the parameters you need in Where to get the parameters.

#Response structure

errorIdinteger
The error flag. 0 — no error, the task was created and its identifier is in taskId. 1 — an error, its code is in errorCode.
errorCodestring
The error code, for example ERROR_ZERO_BALANCE. Present only when errorId is 1. All codes are listed in the Error codes section.
errorDescriptionstring
A human-readable error text in English. In code, rely on errorCode.
taskIdinteger
The identifier of the created task (an integer) for the getTaskResult method. The task is stored for 5 minutes and is available only to your key.
Example: 7654321

#Response example

Without an error:

json
{ "errorId": 0, "taskId": 7654321 }

With an error:

json
{
  "errorId": 1,
  "errorCode": "ERROR_KEY_DOES_NOT_EXIST",
  "errorDescription": "Account authorization key not found in the system."
}
© Tokenwave. hCaptcha solving for Steam.Support: “Help” → ticket in the bot