メインコンテンツへスキップ
POST
https://{yourDomain}
/
oauth
/
access_token
Social with Provider's Access Token
curl --request POST \
  --url https://{yourDomain}/oauth/access_token \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "client_id": "<string>",
  "access_token": "<string>",
  "connection": "facebook",
  "scope": "<string>"
}
'
{
  "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IjEyMzQ1In0...",
  "token_type": "Bearer",
  "expires_in": 86400,
  "refresh_token": "v1.MRHbz1VqR_y42v...",
  "id_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
  "scope": "openid profile email"
}

承認

Authorization
string
header
必須

The access token received from the authorization server in the OAuth 2.0 flow.

ボディ

application/json
client_id
string
必須

Your application's Client ID

access_token
string
必須

The social provider's access token

connection
enum<string>
必須

The name of the social connection

利用可能なオプション:
facebook,
google-oauth2,
twitter,
weibo
scope
string

Space-delimited list of requested scopes

レスポンス

Successful authentication

Successful token response containing access token and optionally ID token and refresh token

access_token
string
必須

The access token issued by the authorization server. Use this token to access protected resources (APIs).

:

"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IjEyMzQ1In0..."

token_type
enum<string>
必須

The type of the token issued. Always 'Bearer' for Auth0.

利用可能なオプション:
Bearer
:

"Bearer"

expires_in
integer
必須

The lifetime in seconds of the access token. After this time, the token will expire and can no longer be used.

:

86400

refresh_token
string

The refresh token which can be used to obtain new access tokens. Only returned if 'offline_access' scope was requested.

:

"v1.MRHbz1VqR_y42v..."

id_token
string

The ID Token containing user profile information. Only returned if 'openid' scope was requested. This is a JWT containing user claims.

:

"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9..."

scope
string

The scopes granted by the authorization server. May differ from requested scopes.

:

"openid profile email"