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

# Authorize application

***

title: "アプリケーションを認可する"
description: "OAuth 2.0の認可コードフローを開始し、ユーザーの同意と認可コードを取得します。"
\---"

## エンドポイント

`GET /authorize`

OAuth 2.0の認可フローを開始するには、まずユーザーを認可URLにリダイレクトする必要があります。

## 認可エンドポイント

この呼び出しの目的は、API (`audience` で指定) を呼び出し、ユーザーに代わって特定の操作 (`scope` で指定) を実行することについて、ユーザーの同意を得ることです。Auth0 は、以前に同意が付与されていない限り、ユーザーを認証して同意を取得します。`scope` の値を変更すると、Auth0 はあらためて同意を求めます。

ユーザーの認可が必要な OAuth 2.0 フローは次のとおりです。

\* [認可コードフロー](https://auth0.com/docs/get-started/authentication-and-authorization-flow/authorization-code-flow)
\* [Proof Key for Code Exchange (PKCE) を使用する認可コードフロー](https://auth0.com/docs/get-started/authentication-and-authorization-flow/authorization-code-flow-with-pkce)
\* [インプリシットフロー](https://auth0.com/docs/get-started/authentication-and-authorization-flow/implicit-flow-with-form-post)

[Resource Owner Password Grant](https://auth0.com/docs/get-started/authentication-and-authorization-flow/resource-owner-password-flow) と [Client Credentials Flow](https://auth0.com/docs/get-started/authentication-and-authorization-flow/client-credentials-flow) では、ユーザーの認可が関与しないため、このエンドポイントは使用されません。代わりに、`POST /oauth/token` エンドポイントを直接呼び出してアクセストークンを取得します。

実装する OAuth 2.0 フローに応じて、パラメータは若干異なります。どのフローが自分のケースに最も適しているかを判断するには、[どの OAuth 2.0 フローを使うべきですか？](https://auth0.com/docs/get-started/authentication-and-authorization-flow/which-oauth-2-0-flow-should-i-use) を参照してください。

## クエリパラメータ

**audience** `string` *required*

アクセス先のAPIを一意に識別するID。

**resource** `string`

アクセスしたい対象API (リソースサーバー) の識別子。Auth0テナントに登録されているAPI Identifierと一致している必要があります。テナントの[Resource Parameter Compatibility Profile](https://auth0.com/docs/get-started/tenant-settings#settings-advanced)が`compatibility`に設定されている場合は、`audience`の代わりに使用します。

**scope** `string`

認可をリクエストするスコープ。スペース区切りで指定する必要があります。標準のOpenID Connect (OIDC) スコープ、カスタムクレーム、または対象APIでサポートされている任意のスコープをリクエストできます。Refresh Tokenを取得するには、`offline_access`を含めてください。

**response\_type** `string` *required*

実行するOAuth 2.0フローをAuth0に示します。Authorization Code Grant Flowには'code'を使用します。

**client\_id** `string` *required*

アプリケーションのID。

**redirect\_uri** `string`

ユーザーが認可を付与した後、Auth0がブラウザーをリダイレクトする先のURL。

**state** `string`

アプリケーションが最初のリクエストに追加し、アプリケーションへリダイレクトする際にAuth0が含める不透明な値。この値は、CSRF攻撃を防ぐためにアプリケーションで使用する必要があります。

**connection** `string`

アプリケーション用に設定されたコネクションの名前。

**prompt** `string`

[サイレント認証](https://auth0.com/docs/authenticate/login/configure-silent-authentication)を開始するには、'prompt=none'を使用します。

**organization** `string`

ユーザーの認証時に使用する組織のID。指定しない場合、アプリケーションで**Display Organization Prompt**が設定されていれば、認証時にユーザーが組織名を入力できます。

**invitation** `string`

組織への招待のチケットID。[組織にメンバーを招待する](/docs/organizations/invite-members)場合、ユーザーが招待を承諾した際に、アプリケーションは invitation と organization のキーと値のペアを引き渡して、招待承諾を処理する必要があります。

**dpop\_jkt** `string`

SHA-256ハッシュ関数を使用した、Proof-of-Possession公開鍵のJWK Thumbprint \[RFC7638]。Demonstrating Proof-of-Possession (DPoP) を使用する場合にのみ指定します。

## レスポンスメッセージ

| ステータス | 説明 |
| - | - |
| 302 | 認可コードを付与してリダイレクト |
