Documentation navigation

AccessTokenResponse

Access and refresh token response.

NameTypeDefinition
access_tokenstringAccess token used to authorize Auth-protected requests.
token_typestringToken type, usually bearer.
expires_innumberAccess token lifetime in seconds.
expires_atnumberUnix timestamp when the access token expires.
refresh_tokenstringRefresh token used to mint a new access token.
user?PublicUserUser record associated with the session.
provider_token?stringProvider access token returned by external OAuth flows.
provider_refresh_token?stringProvider refresh token returned by external OAuth flows.
id_token?stringID token returned by identity provider flows.

Example

{  "access_token": "access-token",  "token_type": "bearer",  "expires_in": 3600,  "expires_at": 1767229200,  "refresh_token": "refresh-token",  "user": {    "id": "user-id",    "project_id": "project-id",    "email": "user@example.com",    "phone": "+15551234567",    "email_verified": true,    "phone_verified": true,    "is_anonymous": false,    "created_at": "2026-01-01T00:00:00.000Z",    "updated_at": "2026-01-01T00:00:00.000Z",    "last_sign_in_at": "2026-01-01T00:00:00.000Z",    "providers": [      "github"    ],    "identities": [      {        "id": "identity-id",        "provider_id": "provider-user-id",        "user_id": "user-id",        "provider": "github",        "email": "user@example.com",        "last_sign_in_at": "2026-01-01T00:00:00.000Z",        "created_at": "2026-01-01T00:00:00.000Z",        "updated_at": "2026-01-01T00:00:00.000Z",        "identity_data": {}      }    ],    "factors": [      {        "id": "factor-id",        "factor_type": "totp",        "status": "verified",        "display_name": "Authenticator app",        "phone": "+15551234567",        "created_at": "2026-01-01T00:00:00.000Z",        "updated_at": "2026-01-01T00:00:00.000Z",        "last_challenged_at": "2026-01-01T00:00:00.000Z"      }    ],    "user_attributes": {},    "system_attributes": {}  },  "provider_token": "provider-access-token",  "provider_refresh_token": "provider-refresh-token",  "id_token": "provider-id-token"}