# 캡챠

### Templates

* API는 모두 GET 메서드를 사용합니다
* GET URL : <https://mora-bot.kr/api/v2/captcha>

| Field    | Type   | Description    |
| -------- | ------ | -------------- |
| img\_url | String | 반환된 캡챠 이미지 URL |
| code     | String | 반환된 캡챠 코드      |

{% code lineNumbers="true" %}

```json
// 응답 내용
{
    "status": 200,
    "Description": "캡챠가 정상적으로 호출되었습니다.",
    "img_url": "http://mora-bot.kr/api/v2/captcha/IuVRKhvw6v",
    "code": "680747"
}
```

{% endcode %}

### NodeJS

{% code lineNumbers="true" %}

```javascript
// node-fetch
const fetch = require('node-fetch')
fetch(`https://mora-bot.kr/api/v2/captcha`)
    .then(res => res.json())
    .then(json => {
        console.log(json)
    });

// request
const request = require('request');
let options = {
    url: `https://mora-bot.kr/api/v2/captcha`
}
request.get(options, function (error, response, body) {
    if (!error && response.status == 200) {
        let json = JSON.parse(body)
        console.log(`반환값 : ${json}`);
    } else {
        console.log('error = ' + response.errorcode);
    }
});
```

{% endcode %}

### Python

{% code lineNumbers="true" %}

```python
import requests

response = requests.get("https://mora-bot.kr/api/v2/captcha")
result = response.json()

if response.status_code == 200:
  print(result)
else:
  print(f"Error Code: {result['status']}")
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.mora-bot.kr/api/guide/version2/captcha.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
