feedbackTask
Report whether a CAPTCHA solution was accepted or rejected by the target site. Feedback improves provider reliability scores used by the routing engine, leading to better provider selection over time.
Endpoint
Section titled “Endpoint”POST https://api.ucaptcha.net/feedbackTaskRequest
Section titled “Request”{ "clientKey": "YOUR_API_KEY", "taskId": "550e8400-e29b-41d4-a716-446655440000", "result": { "invalid": true, "message": "Token was rejected by the target site" }}Request Parameters
Section titled “Request Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
clientKey | string | Yes | Your API key |
taskId | string | Yes | Task ID to report on |
result | object | Yes | Feedback details |
result.invalid | boolean | Yes | true if the solution was bad, false if it was accepted |
result.code | string | No | Optional error code for categorization |
result.message | string | Yes | Description of the issue or confirmation that it worked |
Response
Section titled “Response”{ "errorId": 0, "message": "Feedback recorded"}Response Parameters
Section titled “Response Parameters”| Field | Type | Description |
|---|---|---|
errorId | number | 0 for success, 1 for error |
message | string | Confirmation that the feedback was recorded |
Code Examples
Section titled “Code Examples”Report a bad solution:
curl -X POST https://api.ucaptcha.net/feedbackTask \ -H "Content-Type: application/json" \ -d '{ "clientKey": "YOUR_API_KEY", "taskId": "550e8400-e29b-41d4-a716-446655440000", "result": { "invalid": true, "message": "Token was rejected by the target site" } }'Report a good solution:
curl -X POST https://api.ucaptcha.net/feedbackTask \ -H "Content-Type: application/json" \ -d '{ "clientKey": "YOUR_API_KEY", "taskId": "550e8400-e29b-41d4-a716-446655440000", "result": { "invalid": false, "message": "Solution accepted successfully" } }'Python
Section titled “Python”import requests
# Report a bad solutionresponse = requests.post("https://api.ucaptcha.net/feedbackTask", json={ "clientKey": "YOUR_API_KEY", "taskId": "550e8400-e29b-41d4-a716-446655440000", "result": { "invalid": True, "message": "Token was rejected by the target site" }})
data = response.json()
if data["errorId"] == 0: print("Feedback recorded")else: print(f"Error: {data['errorCode']} - {data['errorDescription']}")JavaScript
Section titled “JavaScript”// Report a bad solutionconst response = await fetch("https://api.ucaptcha.net/feedbackTask", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ clientKey: "YOUR_API_KEY", taskId: "550e8400-e29b-41d4-a716-446655440000", result: { invalid: true, message: "Token was rejected by the target site", }, }),});
const data = await response.json();
if (data.errorId === 0) { console.log("Feedback recorded");} else { console.error(`Error: ${data.errorCode} - ${data.errorDescription}`);}