> For the complete documentation index, see [llms.txt](https://docs.allganize.ai/api-reference/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.allganize.ai/api-reference/ja-1/authentication.md).

# Authentication

## APIキー

APIリクエストを認証するには、リクエストヘッダーにAPIキーを含めてください。

```
API-KEY: your_api_key
```

APIキーは、Alliダッシュボードのプロジェクト設定＞全般で確認できます。

## ユーザー識別

### ユーザーID

ユーザーを指定するには、`OWN-USER-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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.allganize.ai/api-reference/ja-1/authentication.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
