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

# Social with Provider's Access Token

> Deprecated endpoint for authenticating users with a social provider's access token; use browser-based social login instead.

## Endpoint

`POST /oauth/access_token`

> [!NOTE]
>
> This endpoint is part of the legacy authentication pipeline. We recommend that you open the browser to do social authentication instead, which is what [Google and Facebook are recommending](https://developers.googleblog.com/2016/08/modernizing-oauth-interactions-in-native-apps.html). For more information on the latest authentication pipeline refer to [Introducing OIDC Conformant Authentication](https://docs-staging.auth0-mintlify.app/api-auth/intro).
>
> This feature is disabled by default for new tenants as of 8 June 2017. Please see [Application Grant Types](https://docs-staging.auth0-mintlify.app/applications/concepts/application-grant-types) for more information.

Given the social provider's Access Token and the `connection`, this endpoint will authenticate the user with the provider and return a JSON with the Access Token and, optionally, an ID Token. This endpoint only works for Facebook, Google, Twitter, and Weibo.

### Remarks

* The `profile` scope value requests access to the End-User's default profile Claims, which are: `name`, `family_name`, `given_name`, `middle_name`, `nickname`, `preferred_username`, `profile`, `picture`, `website`, `gender`, `birthdate`, `zoneinfo`, `locale`, and `updated_at`.

* The `email` scope value requests access to the `email` and `email_verified` Claims.

### Learn More

* [Call an Identity Provider API](https://auth0.com/docs/authenticate/identity-providers/calling-an-external-idp-api)
* [Identity Provider Access Tokens](https://auth0.com/docs/secure/tokens/access-tokens/identity-provider-access-tokens)
* [Add scopes/permissions to call Identity Provider's APIs](https://auth0.com/docs/authenticate/identity-providers/adding-scopes-for-an-external-idp)

## Body Parameters

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

The `client_id` of your application.

**access\_token** `string` *required*

The social provider's Access Token.

**connection** `string` *required*

The name of an identity provider configured to your app.

**scope** `string`

Use `openid` to get an ID Token, or `openid profile email` to include user information.

## Response Schema

200

\{}

application/json

**id\_token** `string`

The ID token.

**access\_token** `string`

The access token.

**token\_type** `string`

The type of token. Usually `Bearer`.

400 / 401 / 403

\{}

application/json

**error** `string`

Error code.

**error\_description** `string`

Error description.

## Response Messages

| Status | Description |
| - | - |
| 200 | Successful authentication response |
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| default | Unexpected error |
