Get the next request
using System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Post, RequestUri = new Uri("https://cf.antibotapi.com/solves/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/next"), Headers = { { "x-api-key", "<x-api-key>" }, }, Content = new StringContent("{ \"status\": 200, \"headers\": { \"content-type\": \"application/javascript; charset=UTF-8\" }, \"body\": \"<base64 of the response body>\" }") { Headers = { ContentType = new MediaTypeHeaderValue("application/json") } }};using (var response = await client.SendAsync(request)){ response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);}package main
import ( "fmt" "strings" "net/http" "io")
func main() {
url := "https://cf.antibotapi.com/solves/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/next"
payload := strings.NewReader("{ \"status\": 200, \"headers\": { \"content-type\": \"application/javascript; charset=UTF-8\" }, \"body\": \"<base64 of the response body>\" }")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<x-api-key>") req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close() body, _ := io.ReadAll(res.Body)
fmt.Println(res) fmt.Println(string(body))
}const url = 'https://cf.antibotapi.com/solves/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/next';const options = { method: 'POST', headers: {'x-api-key': '<x-api-key>', 'Content-Type': 'application/json'}, body: '{"status":200,"headers":{"content-type":"application/javascript; charset=UTF-8"},"body":"<base64 of the response body>"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://cf.antibotapi.com/solves/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/next \ --header 'Content-Type: application/json' \ --header 'x-api-key: <x-api-key>' \ --data '{ "status": 200, "headers": { "content-type": "application/javascript; charset=UTF-8" }, "body": "<base64 of the response body>" }'Send what came back from the request you were given last, whatever it was. Returns the next request, or done once
the solve is finished. For a challenge page with cleared (its cf_clearance cookie is then in your jar), for a widget
with its token.
A request you gave up on after its timeout_ms goes back as status 0. A solve not done within a minute is dropped.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Header Parameters
Section titled “Header Parameters”Required when request signing is on for your key. See Authentication.
Request Bodyrequired
Section titled “Request Bodyrequired”object
The response’s status, or 0 for a request you gave up on.
The response’s headers, as they came (names in any case; join repeated ones).
object
The response body as it came, Base64.
Example
{ "status": 200, "headers": { "content-type": "application/javascript; charset=UTF-8" }, "body": "<base64 of the response body>"}Responses
Section titled “Responses”The next request, or the end of the solve.
Either request, or done with cleared (a challenge page) or token (a widget).
object
A request to send exactly as given.
object
Every header, as [name, value], in the order to send them. Send them as they stand and add none. Fill the
cookie one, left empty, from your cookie jar for the address (leave it out if you have none for it). Your HTTP
library may set content-length itself; it is given so you can keep its place.
The body to send, for a POST.
Hold the request this many ms before sending it. Cloudflare refuses an answer that arrives sooner than the work it claims could have taken.
Give up after this many ms (0 for no limit) and hand back status 0.
Whether the challenge page’s form let you in. When true, cf_clearance is in your cookie jar.
The widget’s token. Post it as the page’s form would.
Examples
The next request
{ "request": { "method": "POST", "url": "https://www.example.com/cdn-cgi/challenge-platform/h/b/fo/...", "headers": [ [ "content-length", "2327" ], [ "...", "..." ], [ "cf-chl", "g2bs0gK8vVK4W1vYHMqhaVc9BcPIYvmfveFnhsEsvRc-..." ], [ "cookie", "" ], [ "priority", "u=1, i" ] ], "body": "v_a4e9cb6aae35e6ac=...", "wait_ms": 128, "timeout_ms": 5000 }}A challenge page, cleared
{ "done": true, "cleared": true}A widget's token
{ "done": true, "token": "0.Ab3dEf..."}The body is not the JSON this endpoint takes.
object
Example generated
{ "error": "example"}No key, an unknown key, a key out of balance, or a key not on the beta.
object
object
What went wrong.
Example
{ "success": false}No such solve for your key (it ended, expired, or was started by another key).
We could not take the next step: a response that was not what it should be (a 403 where a 200 was due), or a page
or script we cannot read. The solve ends; start a new one.
object
Example
{ "error": "Expected the PageScript request to answer 200, it answered 403"}