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

# Back-Channel Login フロー - ステータスの確認

> 保留中の Back-Channel Login リクエストのステータスを確認するには、トークンエンドポイントをポーリングします。

<div id="endpoint">
  ## エンドポイント
</div>

`POST /oauth/token`

Back-Channel Login フローのステータスを確認するには、次を指定して `/oauth/token` エンドポイントを一定間隔でポーリングします。

* `/bc-authorize` の呼び出しで返される `auth_req_id`
* `urn:openid:params:grant-type:ciba` グラントタイプ

<div id="response-body">
  ### レスポンス本文
</div>

認可するユーザーがまだリクエストを承認または拒否していない場合は、次のようなレスポンスが返されます。

```http theme={null}
{ 
  "error": "authorization_pending", 
  "error_description": "The end-user authorization is pending"
}
```

認可を行うユーザーがリクエストを拒否した場合、次のようなレスポンスが返されます。

```http theme={null}
{
  "error": "access_denied",
  "error_description": "The end-user denied the authorization request or it has been expired"
}
```

ポーリングの間隔が短すぎる場合 (`/bc-authorize` から返された interval 値よりも短い間隔) 、次のようなレスポンスが返されます。

```http theme={null}
{
  "error": "slow_down",
  "error_description": "You are polling faster than allowed. Try again in 10 seconds."
}
```

さらに、Auth0 はレスポンスに [Retry-After](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After) ヘッダーを追加し、再度ポーリングを試みる前に何秒待機すべきかを示します。高頻度でポーリングし続けると、必要な待機時間 (秒) は長くなります。

認可するユーザーがプッシュ通知を承認すると、この呼び出しは IDトークン と アクセストークン (場合によっては リフレッシュトークン も) を返します。

```http theme={null}
{
  "access_token": "eyJh...",
  "id_token": "eyJh...",
  "expires_in": 86400,
  "scope": "openid"
}
```

`auth_req_id` を ID トークンまたはアクセストークンに交換すると、その後は使用できなくなります。

<div id="remarks">
  ### 備考
</div>

リクエストには、アプリケーション認証用のオプションのパラメーターを含めます。

* HTTP Basic auth でクライアントシークレットを使用する場合、パラメーターは不要です。`client_id` と `client_secret` はヘッダーで渡されます。
* Client Secret Post の場合、`client_id` と `client_secret` が必要です。
* Private Key JWT の場合、`client_id`、`client_assertion`、および `client_assertion` type が必要です。
* mTLS の場合、`client_id` パラメーターに加えて、`client-certificate` ヘッダーと `client-certificate-ca-verified` ヘッダーが必要です。

<div id="body-parameters">
  ## Body パラメーター
</div>

<ParamField body="client_id" type="string" required>
  アプリケーションの `client_id`。
</ParamField>

<ParamField body="auth_req_id" type="string" required>
  `/bc-authorize` エンドポイントから返された `auth_req_id`。
</ParamField>

<ParamField body="grant_type" type="string" required>
  `urn:openid:params:grant-type:ciba` に設定する必要があります。
</ParamField>

<div id="response-messages">
  ## レスポンスメッセージ
</div>

| ステータス | 説明                   |
| ----- | -------------------- |
| 200   | 認証のステータスが返されます。      |
| 400   | 不正なリクエスト - 無効なパラメーター |
| 500   | 内部サーバーエラー            |
