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

# プロバイダーアクセストークン付きソーシャル

> note

`POST /oauth/access_token`

note
このエンドポイントはレガシー認証パイプラインの一部です。この代わりに、ブラウザーを開いてソーシャル認証を行うことをお勧めします。これは、[GoogleとFacebookからも推奨](https://developers.googleblog.com/2016/08/modernizing-oauth-interactions-in-native-apps.html)されています。最新の認証パイプラインについては、「[OIDC準拠の認証を導入する](/docs/ja-jp/api/authentication/api-auth/intro)」を参照してください。

2017年6月8日以降、新規テナントではこの機能がデフォルトで無効になりました。詳細については、「[アプリケーションの付与タイプ](/docs/ja-jp/api/authentication/applications/concepts/application-grant-types)」を参照してください。

ソーシャルプロバイダーのアクセストークンと`connection`が渡されると、このエンドポイントはユーザーをプロバイダーで認証し、アクセストークンとIDトークン（任意）を含むJSON応答を返します。このエンドポイントは、Facebook、Google、Twitter、Weiboにのみ利用できます。

### 備考

*

`profile`スコープ値は、エンドユーザーのデフォルトのプロファイルクレームである`name`、`family_name`、`given_name`、`middle_name`、`nickname`、`preferred_username`、`profile`、`picture`、`website`、`gender`、`birthdate`、`zoneinfo`、`locale`、`updated_at`へのアクセスを要求します。

*

`email`スコープ値は`email`と`email_verified`クレームへのアクセスを要求します。

### 詳しい情報

* [IDプロバイダーのAPIを呼び出す](https://auth0.com/docs/ja-jp/authenticate/identity-providers/calling-an-external-idp-api)
* [IDプロバイダーのアクセストークン](https://auth0.com/docs/ja-jp/secure/tokens/access-tokens/identity-provider-access-tokens)
* [IDプロバイダーのAPIにスコープ/権限を追加する](https://auth0.com/docs/ja-jp/authenticate/identity-providers/adding-scopes-for-an-external-idp)

## Parameters

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

<ParamField body="access_token" type="string">
  ソーシャルプロバイダーのアクセストークンです。
</ParamField>

<ParamField body="connection" type="string">
  アプリに構成されているIDプロバイダーの名前です。
</ParamField>

<ParamField body="scope" type="string">
  `openid`を使用してIDトークンを取得するか、`openid profile email`を使用してIDトークンにユーザー情報を含めます。
</ParamField>

## Response

| Status  | Description |
| ------- | ----------- |
| 200     | 正常な認証応答     |
| 400     | 不正なリクエスト    |
| 401     | 未認可         |
| 403     | 閲覧禁止        |
| default | 予期しないエラー    |
