# Authentication

## API 키

API 요청을 인증하려면 요청 헤더에 API 키를 포함해 주세요:

```
API-KEY: your_api_key
```

API 키는 Alli 대시보드의 설정 메뉴(일반 탭)에서 찾을 수 있습니다.

## 유저 식별

### 유저 ID

`OWN-USER-ID` 헤더에 유저 ID를 포함하여 지정해 주세요. 유저 ID에는 두가지 타입이 존재합니다.

* 기존 유저 ID - 이전에 생성된 유저를 식별
* 신규 유저 ID - 새로운 ID 가 입력되면 Alli 가 해당 ID 로 신규 유저를 생성합니다.

동일한 `OWN-USER-ID` 헤더가 사용되면 해당 API 콜은 동일 유저가 실행한 것으로 인식됩니다.

### 이메일 정보

`USER-EMAIL` 헤더에 포함하여 유저와 이메일 주소를 연결할 수 있습니다.

### 비ASCII 문자 제한

`OWN-USER-ID` 헤더는 비ASCII 문자를 포함할 수 없습니다. 유저 ID에 비ASCII 문자가 포함된 경우 base64로 인코딩해 주세요. 다음과 같은 형식을 사용해 주세요 :

```
OWN-USER-ID: base64:CONVERTED_ID
```

유저 ID 및 이메일 정보는 Alli 대시보드 내의 멤버 탭에서 확인할 수 있습니다.

```
OWN-USER-ID: 5f1234567a409876c082487
USER-EMAIL: user_1@email.com
```

## 에이전트 정보

특정 에이전트의 정보를 사용하여 API 호출을 하려면 `AGENT-EMAIL` 헤더에 에이전트의 이메일을 포함해 주세요.

`AGENT-EMAIL` 헤더에 로그인한 에이전트의 이메일을 포함하면 API 호출이 해당 에이전트의 정보를 사용합니다.

```
AGENT-EMAIL: agent_1@email.com
```


---

# 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.allganize.ai/api-reference/korean/authentication.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.
