OAuth Token Wallet

The OAuth Token Wallet allows developers to easily get an active access token for a user's connected OAuth account, e.g. Sign In with Google.

If an access token has expired, a new one will be issued transparently and returned in the response. Note that the refresh functionality might not work for every OAuth provider right now, in which case an error will be returned.

Available requests

  • GET /v1/users/:id/oauth_access_tokens/:provider

get
Retrieve token

https://api.clerk.dev/v1/users/:id/oauth_access_tokens/:provider
Retrieve a valid (i.e. non-expired) OAuth access token for a user's connected OAuth account
Request
Response
Request
Path Parameters
provider
required
string
The ID of the OAuth provider (e.g. facebook,google).
id
required
string
The Clerk user ID.
Response
200: OK
{
"token": "xxxxxxxxxxxxxxxxxxxxx",
"provider": "google",
"scopes": [
"openid",
"https://www.googleapis.com/auth/userinfo.email"
"https://www.googleapis.com/auth/userinfo.profile"
]
}