> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.littglobal.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.littglobal.com/_mcp/server.

# Challenge Response

POST TBD/api/v2/verify-challenge
Content-Type: application/json

The given endpoint is used to verify a captcha response. This process primarily involves confirming if the provided code correctly matches the assigned captcha challenge.

#### Request Body

- `challenge_id` (String): The unique challenge identifier
    
- `code` (String): The captcha response code provided by the user
    

#### Response

- `verified` (Boolean): Indicator of whether the captcha response provided is correct or not. Returns `true` if correct, `false` otherwise.

Reference: https://docs.littglobal.com/litt-white-label/api-reference/authentication/challenge-response

## Request

### Body (application/json)

This endpoint expects an object.

- `api` (string, optional)
- `data` (ApiV2VerifyChallengePostRequestBodyContentApplicationJsonSchemaData, optional)

## Response

### 200

Challenge Response

- `message` (string, optional)
- `api` (string, optional)
- `status` (string, optional)
- `data` (ApiV2VerifyChallengePostResponsesContentApplicationJsonSchemaData, optional)

## Types

### ApiV2VerifyChallengePostRequestBodyContentApplicationJsonSchemaData

- `challenge_id` (string, optional)
- `code` (string, optional)

### ApiV2VerifyChallengePostResponsesContentApplicationJsonSchemaData

- `verified` (boolean, optional)

## Examples

**Request**

```json
{
  "api": "verify-challenge",
  "data": {
    "challenge_id": "2bb8a7f7-dd47-42e9-a403-17a4a623ec6d",
    "code": "mcvxpt"
  }
}
```

**Response**

```json
{
  "message": "Success",
  "api": "verify-challenge",
  "status": "success",
  "data": {
    "verified": true
  }
}
```

**SDK Code**

```python Authentication_challengeResponse_example
import requests

url = "https://tbd/api/v2/verify-challenge"

payload = {
    "api": "verify-challenge",
    "data": {
        "challenge_id": "2bb8a7f7-dd47-42e9-a403-17a4a623ec6d",
        "code": "mcvxpt"
    }
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Authentication_challengeResponse_example
const url = 'https://tbd/api/v2/verify-challenge';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '{"api":"verify-challenge","data":{"challenge_id":"2bb8a7f7-dd47-42e9-a403-17a4a623ec6d","code":"mcvxpt"}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Authentication_challengeResponse_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://tbd/api/v2/verify-challenge"

	payload := strings.NewReader("{\n  \"api\": \"verify-challenge\",\n  \"data\": {\n    \"challenge_id\": \"2bb8a7f7-dd47-42e9-a403-17a4a623ec6d\",\n    \"code\": \"mcvxpt\"\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	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))

}
```

```ruby Authentication_challengeResponse_example
require 'uri'
require 'net/http'

url = URI("https://tbd/api/v2/verify-challenge")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n  \"api\": \"verify-challenge\",\n  \"data\": {\n    \"challenge_id\": \"2bb8a7f7-dd47-42e9-a403-17a4a623ec6d\",\n    \"code\": \"mcvxpt\"\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java Authentication_challengeResponse_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://tbd/api/v2/verify-challenge")
  .header("Content-Type", "application/json")
  .body("{\n  \"api\": \"verify-challenge\",\n  \"data\": {\n    \"challenge_id\": \"2bb8a7f7-dd47-42e9-a403-17a4a623ec6d\",\n    \"code\": \"mcvxpt\"\n  }\n}")
  .asString();
```

```php Authentication_challengeResponse_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://tbd/api/v2/verify-challenge', [
  'body' => '{
  "api": "verify-challenge",
  "data": {
    "challenge_id": "2bb8a7f7-dd47-42e9-a403-17a4a623ec6d",
    "code": "mcvxpt"
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Authentication_challengeResponse_example
using RestSharp;

var client = new RestClient("https://tbd/api/v2/verify-challenge");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"api\": \"verify-challenge\",\n  \"data\": {\n    \"challenge_id\": \"2bb8a7f7-dd47-42e9-a403-17a4a623ec6d\",\n    \"code\": \"mcvxpt\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Authentication_challengeResponse_example
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = [
  "api": "verify-challenge",
  "data": [
    "challenge_id": "2bb8a7f7-dd47-42e9-a403-17a4a623ec6d",
    "code": "mcvxpt"
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://tbd/api/v2/verify-challenge")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```