> For the complete documentation index, see [llms.txt](https://docs.flosum.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flosum.com/global-settings/global-settings-docs-ja/sekyuriti/apitkun/api-tkunno.md).

# API トークンの作成

{% hint style="success" %}

#### 必要なユーザー資格情報

\[**Flosum ユーザー**」 - 任意のロール
{% endhint %}

## ![](https://1457003412-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsEk2hU5IMh3HEY5dJZjR%2Fuploads%2FSxcnKlaJKPzDqONWoDNv%2FSummary2-Small-Icon.svg?alt=media\&token=5e3253d0-a069-4ba5-9c06-83c70bd0b21d) 概要

この記事では、Flosum の API へのアクセスを許可するために使用する API トークンの作成方法を説明します。このトークンは、以下の API にアクセスするために使用できます。

* Flosum の SCIM API を使った Identity Provider のユーザー管理。
* Flosum の DevOps コマンドラインインターフェース。

## APIトークンを作成

{% stepper %}
{% step %}

### グローバル設定にアクセス

1. 任意の **Flosum Cloud App**で、 **アプリスイッチャー** アイコンを左側のサイドバーメニュー上部でクリックします。

   <div align="left"><figure><img src="https://1457003412-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsEk2hU5IMh3HEY5dJZjR%2Fuploads%2Fgh5FcQCnErKAjJ7isiuB%2FGS-Access-01.png?alt=media&amp;token=ddf01506-f133-4e49-825a-76a2a237e3a8" alt="" width="563"><figcaption></figcaption></figure></div>
2. クリック **グローバル設定**.&#x20;

   <div align="left"><figure><img src="https://1457003412-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsEk2hU5IMh3HEY5dJZjR%2Fuploads%2Fx5vntzgpLuT50fMTzwT9%2FGS-Access-02.png?alt=media&amp;token=f67a125f-5087-47c2-9bc6-9393c3d2b7a5" alt="" width="563"><figcaption></figcaption></figure></div>
3. その **グローバル設定** アプリは新しいタブで開きます。

{% hint style="info" %}
グローバル設定には、Flosum Cloud Apps のログインURLから直接ログインしてアクセスすることもできます。ログイン手順については、以下の記事を参照してください。

* [グローバル設定にログインする](/global-settings/global-settings-docs-ja/hajimeni/gurbaruniroguinsuru.md)
  {% endhint %}
  {% endstep %}

{% step %}

### APIトークンを作成

1. クリック **APIトークン** 左側のサイドバーメニューから。
2. クリック **作成**.

   <div align="left"><figure><img src="https://1457003412-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsEk2hU5IMh3HEY5dJZjR%2Fuploads%2FgqoftgRzO9nY2rpu9hQ1%2FCreatingAnApiToken-S02-01.png?alt=media&amp;token=f4489e15-bb83-4922-b503-f073a8491c19" alt="" width="563"><figcaption></figcaption></figure></div>
3. わかりやすい **名前** をトークンに入力します。
4. 次をクリックします **有効期限** ドロップダウンメニュー。

   <div align="left"><figure><img src="https://1457003412-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsEk2hU5IMh3HEY5dJZjR%2Fuploads%2FMvVcw1ljSEHQESSBAJwg%2FCreatingAnApiToken-S02-02.png?alt=media&amp;token=344df77f-4a37-4ed7-9028-d80d725f4461" alt="" width="375"><figcaption></figcaption></figure></div>
5. APIトークンを有効にする日数を選択します。

   <div align="left"><figure><img src="https://1457003412-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsEk2hU5IMh3HEY5dJZjR%2Fuploads%2FYCWyJwPCL6XM7iA6g8N8%2FCreatingAnApiToken-S02-03.png?alt=media&amp;token=c8ad062c-2cff-4e30-9cfb-34271b1e0e49" alt="" width="375"><figcaption></figcaption></figure></div>

{% hint style="warning" %}

#### トークンの有効期限

APIトークンが期限切れになると、そのトークンを使用するサービスはFlosumのAPIにアクセスできなくなります。SSOアイデンティティプロバイダーのような継続的なアクセスを必要とするサービスの場合は、次を選択してください **有効期限なし**.
{% endhint %}

6. クリック **作成**.

   <div align="left"><figure><img src="https://1457003412-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsEk2hU5IMh3HEY5dJZjR%2Fuploads%2F762dulJyPwAQ8MpAzRaU%2FCreatingAnApiToken-S02-04.png?alt=media&amp;token=fee34784-77de-4d2e-9add-03b7baa92be0" alt="" width="375"><figcaption></figcaption></figure></div>

{% endstep %}

{% step %}

### APIトークンを保存

{% hint style="warning" %}

#### APIトークン

APIトークンは一度しか表示されません。トークンを紛失した場合は、新しいトークンを生成するために更新する必要があります。トークンを更新すると以前のトークンは無効になり、それを使用しているすべてのサービスも更新する必要があります。
{% endhint %}

1. 作成すると、APIトークンが表示されます。
2. 次をクリックします **コピー** アイコンを使ってトークンをコピーし、安全な場所に保存してください。再度表示することはできません。

   <div align="left"><figure><img src="https://1457003412-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsEk2hU5IMh3HEY5dJZjR%2Fuploads%2FWfkw10WLti9bHD3HVVFk%2FCreatingAnApiToken-S03-01.png?alt=media&amp;token=809004be-b572-4ca0-9f24-9b2e961c60ce" alt="" width="375"><figcaption></figcaption></figure></div>
3. クリック **閉じる**.
4. 作成したトークンは現在、APIトークン一覧テーブルに表示されています。

   <div align="left"><figure><img src="https://1457003412-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsEk2hU5IMh3HEY5dJZjR%2Fuploads%2FocJvxwLRdGw2oGNiG2iQ%2FCreatingAnApiToken-S03-02.png?alt=media&amp;token=19b34f62-3753-420a-aaa9-a086bff17430" alt="" width="563"><figcaption></figcaption></figure></div>

{% endstep %}
{% endstepper %}


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.flosum.com/global-settings/global-settings-docs-ja/sekyuriti/apitkun/api-tkunno.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
