Skip to main content
GET
/
v1
/
users
/
{user_id}
C#
// GET /v1/users/{user_id}
const stytch = require('stytch');

const client = new stytch.Client({
  project_id: '${projectId}',
  secret: '${secret}',
});

const params = {
  user_id: "${userId}",
};

client.Users.Get(params)
  .then(resp => { console.log(resp) })
  .catch(err => { console.log(err) });
{
  "request_id": "<string>",
  "user_id": "<string>",
  "emails": [
    {
      "email_id": "<string>",
      "email": "<string>",
      "verified": true
    }
  ],
  "status": "<string>",
  "phone_numbers": [
    {
      "phone_id": "<string>",
      "phone_number": "<string>",
      "verified": true
    }
  ],
  "webauthn_registrations": [
    {
      "webauthn_registration_id": "<string>",
      "domain": "<string>",
      "user_agent": "<string>",
      "verified": true,
      "authenticator_type": "<string>",
      "name": "<string>"
    }
  ],
  "providers": [
    {
      "provider_type": "<string>",
      "provider_subject": "<string>",
      "profile_picture_url": "<string>",
      "locale": "<string>",
      "oauth_user_registration_id": "<string>"
    }
  ],
  "totps": [
    {
      "totp_id": "<string>",
      "verified": true
    }
  ],
  "crypto_wallets": [
    {
      "crypto_wallet_id": "<string>",
      "crypto_wallet_address": "<string>",
      "crypto_wallet_type": "<string>",
      "verified": true
    }
  ],
  "biometric_registrations": [
    {
      "biometric_registration_id": "<string>",
      "verified": true
    }
  ],
  "is_locked": true,
  "roles": [
    "<string>"
  ],
  "status_code": 123,
  "name": {
    "first_name": "<string>",
    "middle_name": "<string>",
    "last_name": "<string>"
  },
  "created_at": "<string>",
  "password": {
    "password_id": "<string>",
    "requires_reset": true
  },
  "trusted_metadata": {},
  "untrusted_metadata": {},
  "external_id": "<string>",
  "lock_created_at": "<string>",
  "lock_expires_at": "<string>"
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Path Parameters

user_id
string
required

The unique ID of a specific User. You may use an external_id here if one is set for the user.

Response

Successful response

request_id
string
required

Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue.

user_id
string
required

The unique ID of the returned User.

emails
object[]
required

An array of email objects for the User.

status
string
required

The status of the User. The possible values are pending and active.

phone_numbers
object[]
required

An array of phone number objects linked to the User.

webauthn_registrations
object[]
required

An array that contains a list of all Passkey or WebAuthn registrations for a given User in the Stytch API.

providers
object[]
required

An array of OAuth provider objects linked to the User.

totps
object[]
required

An array containing a list of all TOTP instances for a given User in the Stytch API.

crypto_wallets
object[]
required

An array contains a list of all crypto wallets for a given User in the Stytch API.

biometric_registrations
object[]
required

An array that contains a list of all biometric registrations for a given User in the Stytch API.

is_locked
boolean
required
roles
string[]
required

Roles assigned to this User. See the RBAC guide for more information about role assignment.

status_code
integer<int32>
required

The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.

name
object

The name of the User. Each field in the name object is optional.

created_at
string

The timestamp of the User's creation. Values conform to the RFC 3339 standard and are expressed in UTC, e.g. 2021-12-29T12:33:09Z.

password
object

The password object is returned for users with a password.

trusted_metadata
object

The trusted_metadata field contains an arbitrary JSON object of application-specific data. See the Metadata reference for complete field behavior details.

untrusted_metadata
object

The untrusted_metadata field contains an arbitrary JSON object of application-specific data. Untrusted metadata can be edited by end users directly via the SDK, and cannot be used to store critical information. See the Metadata reference for complete field behavior details.

external_id
string
lock_created_at
string
lock_expires_at
string