> ## Documentation Index
> Fetch the complete documentation index at: https://docs.omocaptcha.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Set API KEY cho extension

> Cấu hình API Key cho extension OMOCaptcha

Sau khi đã cài extension vào trình duyệt (xem [Cài extension từ file zip](/vi/huong-dan/cai-extension-tu-file-zip)), bạn có **3 cách** để thiết lập API Key cho extension:

<CardGroup cols={3}>
  <Card title="Cách 1" icon="mouse-pointer">
    Nhập trực tiếp vào extension
  </Card>

  <Card title="Cách 2" icon="file-code">
    Chỉnh sửa file `configs.json`
  </Card>

  <Card title="Cách 3" icon="link">
    Dùng URL trên trình duyệt
  </Card>
</CardGroup>

## Cách 1. Nhập trực tiếp vào extension

Sau khi cài extension, bạn nhấp vào biểu tượng **tiện ích (extension icon)** trên thanh công cụ của trình duyệt để mở popup của extension.

<Frame>
  <img src="https://mintcdn.com/omocaptcha/Jc1mwaiUF23R0W3R/images/huong-dan/set-api-key/01-click-extension-icon.png?fit=max&auto=format&n=Jc1mwaiUF23R0W3R&q=85&s=9a838d087ba440953b446d8be0650b6c" alt="Nhấp biểu tượng extension" width="1914" height="1000" data-path="images/huong-dan/set-api-key/01-click-extension-icon.png" />
</Frame>

Trong popup vừa mở, hãy dán **API Key** của bạn vào ô **Your client key** rồi bấm ra ngoài để lưu.

<Frame>
  <img src="https://mintcdn.com/omocaptcha/Jc1mwaiUF23R0W3R/images/huong-dan/set-api-key/02-nhap-client-key.png?fit=max&auto=format&n=Jc1mwaiUF23R0W3R&q=85&s=c22f0c485a237f4718fe5696bbe9b654" alt="Nhập client key vào extension" width="1916" height="992" data-path="images/huong-dan/set-api-key/02-nhap-client-key.png" />
</Frame>

<Tip>
  Nếu chưa có API Key, hãy đăng nhập tại [omocaptcha.com](https://omocaptcha.com) và lấy API Key trong mục quản lý tài khoản.
</Tip>

## Cách 2. Nhập trực tiếp vào file trong extension

Bấm vào [đây](https://drive.google.com/drive/folders/1) để đến thư mục chứa các extension. Mật khẩu giải nén là `12345`.

Sau khi tải về và giải nén, ta tìm đến file **`configs.json`** trong thư mục extension.

<Frame>
  <img src="https://mintcdn.com/omocaptcha/Jc1mwaiUF23R0W3R/images/huong-dan/set-api-key/03-file-configs-json.png?fit=max&auto=format&n=Jc1mwaiUF23R0W3R&q=85&s=9a39e3b773e1ddab71049c7d7be48b9c" alt="File configs.json trong thư mục extension" width="1916" height="1003" data-path="images/huong-dan/set-api-key/03-file-configs-json.png" />
</Frame>

Mở file lên bằng trình soạn thảo văn bản trên máy tính (Notepad, VS Code, Sublime Text…) và tìm tới dòng có văn bản **`YOUR_CLIEN_KEY`**. Thay API Key của bạn vào đó rồi lưu file lại.

<Frame>
  <img src="https://mintcdn.com/omocaptcha/Jc1mwaiUF23R0W3R/images/huong-dan/set-api-key/04-sua-your-clien-key.png?fit=max&auto=format&n=Jc1mwaiUF23R0W3R&q=85&s=d99836b82b730f3d77a2eddd49d605cf" alt="Sửa YOUR_CLIEN_KEY thành API Key của bạn" width="1920" height="938" data-path="images/huong-dan/set-api-key/04-sua-your-clien-key.png" />
</Frame>

Ví dụ trước khi sửa:

```json configs.json theme={null}
{
  "api_key": "YOUR_CLIEN_KEY",
  "power_on": true,
  ...
}
```

Sau khi sửa:

```json configs.json theme={null}
{
  "api_key": "abc123-your-real-api-key-xyz",
  "power_on": true,
  ...
}
```

<Warning>
  Sau khi sửa file `configs.json`, hãy vào `chrome://extensions/` và nhấn nút **tải lại (reload)** ở extension OMOCaptcha để áp dụng thay đổi.
</Warning>

## Cách 3. Nhập qua URL trên trình duyệt

Sau khi cài extension vào trình duyệt, bạn chỉ cần truy cập URL với định dạng như sau — extension sẽ **tự động** nhận và lưu API Key:

```text theme={null}
https://omocaptcha.com/set-key?api_key=YOUR_API_KEY
```

Thay `YOUR_API_KEY` bằng API Key thật của bạn rồi dán vào thanh địa chỉ của trình duyệt.

<Frame>
  <img src="https://mintcdn.com/omocaptcha/Jc1mwaiUF23R0W3R/images/huong-dan/set-api-key/05-set-key-url.png?fit=max&auto=format&n=Jc1mwaiUF23R0W3R&q=85&s=946aff9b51bd04c096fba3f01a7204b0" alt="Set API Key bằng URL" width="1919" height="1029" data-path="images/huong-dan/set-api-key/05-set-key-url.png" />
</Frame>

Khi trang hiển thị **SET KEY OMOCAPTCHA** là bạn đã thiết lập thành công.

<Warning>
  Không chia sẻ API Key của bạn cho người khác. Nếu bị lộ, hãy tạo lại API Key mới trong trang quản lý tài khoản.
</Warning>
