Step 1 : Creating a Task
Use the method createTask to submit the required information:
POST https://api.capsolver.com/createTask
Host: api.capsolver.com
Content-Type: application/json
{
"clientKey": "YOUR_API_KEY",
"task": {
"type": "HCaptchaTaskProxyless",
"websiteURL": "https://hcaptcha.com/",
"websiteKey": "00000000-0000-0000-0000-000000000000"
}
}
After you submit the task to us, you should receive in the response a ‘Task id’ if it’s successful. Please read errorCode: full list of errors if you didn’t receive the task id.
Example response:
{
"errorId": 0,
"errorCode": "",
"errorDescription": "",
"taskId": "61138bb6-19fb-11ec-a9c8-0242ac110006"
}
Step 2 : Getting Results
To verify the results, you'll need to continuously poll the getTaskResult API endpoint until the captcha is resolved. Depending on the system load, you will get the results within the interval of 1s to 10s.
Example request:
POST https://api.capsolver.com/getTaskResult
Host: api.capsolver.com
Content-Type: application/json
{
"clientKey": "YOUR_API_KEY",
"taskId": "61138bb6-19fb-11ec-a9c8-0242ac110006"
}
Example response:
{
"errorId": 0,
"errorCode": null,
"errorDescription": null,
"solution": {
//userAgent used to solve the captcha
"userAgent": "xxx",
//expireTime of the token
"expireTime": 1671615324290,
"timestamp": 1671615024290,
"captchaKey": "E0_xxx",
//token of the captcha
"gRecaptchaResponse": "3AHJ....."
},
"status": "ready"
}