GET
/users/{user_id}/oauth_access_tokens/{provider}Retrieve the OAuth access token of a user
Fetch the corresponding OAuth access token for a user that has previously authenticated with a particular OAuth provider. For OAuth 2.0, if the access token has expired and we have a corresponding refresh token, the access token will be refreshed transparently the new one will be returned.
user_idstringrequired
The ID of the user for which to retrieve the OAuth access token
providerstringrequired
The ID of the OAuth provider (e.g. `oauth_google`)
paginatedbooleanoptional
Whether to paginate the results.
If true, the results will be paginated.
If false, the results will not be paginated.
limitintegeroptional
Applies a limit to the number of results returned.
Can be used for paginating the results together with `offset`.
offsetintegeroptional
Skip the first `offset` results when paginating.
Needs to be an integer greater or equal to zero.
To be used in conjunction with `limit`.
200Success
objectstringrequired
external_account_idstringrequired
External account ID
provider_user_idstringrequired
The unique ID of the user in the external provider's system
tokenstringrequired
The access token
expires_atintegerrequired
Unix timestamp of the access token expiration.
providerstringrequired
The ID of the provider
public_metadataobjectrequired
labelstringrequired
scopesarray<string>optional
The list of scopes that the token is valid for. Only present for OAuth 2.0 tokens.
id_tokenstringoptional
The ID token retrieved from the OIDC provider. Only present for OIDC-compliant OAuth 2.0 providers when available.
token_secretstringoptional
The token secret. Only present for OAuth 1.0 tokens.
400Request was not successful
errorsarray<object>required
metaobjectoptional
clerk_trace_idstringoptional
404Resource not found
errorsarray<object>required
metaobjectoptional
clerk_trace_idstringoptional
422Invalid request parameters
errorsarray<object>required
metaobjectoptional
clerk_trace_idstringoptional
Error handling
A 400 is returned: Request was not successful. A 404 is returned: Resource not found. A 422 is returned: Invalid request parameters.