getUserOauthAccessToken()
Retrieve the corresponding OAuth access token for a user that has previously authenticated with a particular OAuth provider.
- Name
userId
- Type
string
- Description
The ID of the user to retrieve the OAuth access token for.
- Name
provider
- Type
oauth_${OAuthProvider}
- Description
The OAuth provider to retrieve the access token for.
You can also explore the example that demonstrates how this method retrieves a social provider's OAuth access token, enabling access to user data from both the provider and Clerk.
Backend API (BAPI) endpoint
This method in the SDK is a wrapper around the BAPI endpoint GET/users/{user_id}/oauth_access_tokens/{provider}
. See the BAPI reference for more information.
Feedback
Last updated on