> For the complete documentation index, see [llms.txt](https://docs.ggwp.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ggwp.com/jp/apidokyumento/pakkji.md).

# 標準パッケージ

## 認証

GGWPでは、APIキーを使用して、認可されたユーザーに以下に記載されているすべてのAPIエンドポイントへの安全なアクセスを付与します。すべてのリクエストでは、発行されたAPIキーとともに次のHTTPヘッダーを指定する必要があります:

`x-api-key: <API_KEY>`

各APIキーは：

* あなたのプラットフォーム/ゲームを一意に識別します
* このドキュメントに記載されているすべてのAPIへのアクセスを可能にします
* 1秒あたりに行えるリクエスト数に固有のレート制限があり、さらに月単位で行えるリクエスト数の固定クォータが設定される場合があります
* 秘密に保持し、権限のないゲーム／ユーザーと共有してはなりません
* 紛失した場合は、新しいキーを再生成する必要があります

APIキーの発行およびゲームに必要な適切なレート制限の設定については、GGWPのアカウント担当者にお問い合わせください。

## APIキーの使い方

以下は、有効なAPIキーを使用した本番APIエンドポイントの呼び出し例です（この例ではキーは伏せられています）：

```bash
curl --location --request POST 'https://api.ggwp.com/voice/v1/ingest' \
--header 'file-name: 20230620_john123.wav' \
--header 'user-id: player10' \
--header 'username: john123' \
--header 'session-id: match_unranked_20230620_12345' \
--header 'audio-time: 2023-06-20 10:24:23' \
--header 'x-api-key: api_key' \\
--data-binary '@/location/to/20230620_john123.wav'
```

無効なAPIキーでは、 `403` 返却コード。以下は無効なAPIキーでの応答例です:

```bash
< HTTP/2 403
< date: Thu, 18 Nov 2021 21:28:27 GMT
< content-type: application/json
< content-length: 23
< x-amzn-requestid: f4361ec6-71bc-478f-98cd-da0fe9df829b
< x-amzn-errortype: ForbiddenException
< x-amz-apigw-id: JBPLRHGjPHcFdbg=
<
* Connection #0 to host api.ggwp.com left intact
{"message":"Forbidden"}* Closing connection 0
```
