/
Contact usSee pricingStart building
    Introduction
    Overview
    Postman
    Users
      Create user
      Search users
      Get user
      Update user
      Exchange primary factor
    • Delete

      • Delete user
        Delete user email
        Delete user phone number
        Delete user WebAuthn registration
        Delete user biometric registration
        Delete user TOTP
        Delete user crypto wallet
        Delete user password
        Delete user OAuth registration
    Magic links
    • Via email

      • Send magic link
        Log in or create user
        Invite
        Revoke pending invite
    • Embeddable

      • Create
      Authenticate
    OAuth
      Attach
      Authenticate
    • Start

      • Google
        Amazon
        Apple
        Bitbucket
        Coinbase
        Discord
        Facebook
        Figma
        GitHub
        GitLab
        Linkedin
        Microsoft
        Salesforce
        Slack
        Snapchat
        TikTok
        Twitch
        Twitter
        Yahoo
    Passwords
      Create
      Authenticate
      Strength check
      Migrate
    • Reset options

      • Password reset by email start
        Password reset by email
        Password reset by existing password
        Password reset by session
    One-time passcodes (OTP)
    • Via SMS

      • Send
        Login or create user
    • Via Whatsapp

      • Send
        Login or create user
    • Via email

      • Send
        Login or create user
      Authenticate
    Session management
      Session object
      Get JWKS
      Get sessions
      Authenticate Session
      Revoke session
      Migrate session
    Passkeys & WebAuthn
    • Register

      • Start
        Register
    • Authenticate

      • Start
        Authenticate
      Update
      List WebAuthn Credentials
    Time-based one-time passcodes (TOTP)
      Create
      Authenticate
      Get recovery codes
      Recover
    Crypto wallets
      Authenticate start
      Authenticate
    M2M Authentication
      M2M Client Object
    • Token

      • Get Access Token
        Authenticate Access Token
    • M2M Client

      • Create M2M client
        Get M2M client
        Search M2M clients
        Update M2M client
        Delete M2M client
    • Rotate secret

      • Start secret rotation
        Rotate secret
        Cancel secret rotation
    Connected AppsBeta
      Get Access Token
    • Tokens

      • Connected App ID Token Object
        Connected App Access Token Object
    • Configuration

      • Get JWKS
        Get OpenID Configuration
    • Methods

      • Introspect Token
        Authenticate Access Token (Local)
        Exchange Access Token
        Revoke Token
        Get UserInfo
    • Management

      • Get Authorized Connected Apps for a User
        Revoke Connected App Access to a User
    User Impersonation
      Authenticate Token
    Resources
      Email templates
      URL validation
      Metadata
      User states
    Errors
      Overview
      Error object
      400
      401
      403
      404
      405
      429
      499
      500
      503
Get support on SlackVisit our developer forum

Contact us

Consumer Authentication

/

API reference

/

Connected Apps

/

Methods

/

Get UserInfo

Get UserInfo

GET
https://test.stytch.com/v1/public/${projectId}/oauth2/userinfo

If your project has a custom domain configured, this endpoint will also be available at https://{customdomain}/oauth2/userinfo.

Get claims about the authenticated end-user, using an Access Token. Claims that do not exist will be omitted.

The contents of the response depend on the scopes granted to the client:

  • All responses will always contain the sub claim.
  • If the profile scope is granted, the name, given_name, family_name, profile_picture, and locale claims will be returned.
  • If the email scope is granted, the email and email_verified claims will be returned.
  • If the phone scope is granted, the phone_number and phone_number_verified claims will be returned.

You can call this endpoint via both GET and POST.

Important: Unlike other Stytch API endpoints, this endpoint is not authenticated with a project_id and project_secret pair. Instead, it is authenticated via the access_token of an active Connected App Client within the current project. You will need to pass the access token as a header with the "bearer" prefix.

This endpoint implements the OpenID Connect Core 1.0 UserInfo Endpoint.


Path parameters


project_id* string

Response fields


sub string

phone_number string

phone_number_verified boolean

email string

email_verified boolean

name string

given_name string

middle_name string

family_name string

picture string

locale string

status_code int

request_id string
// Backend SDK coming soon!
RESPONSE
200
​
{
	"email": "sandbox@stytch.com",
	"email_verified": true,
    "name" : "Jane Doe",
    "given_name" : "Jane",
    "family_name" : "Doe",
    "middle_name" : "",
	"request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
	"status_code": 200,
	"sub": "member-test-32fc5024-9c09-4da3-bd2e-c9ce4da9375f"
}