getUser

abstract suspend fun getUser(): GetMeResponse

Fetches the current user's full profile from the Stytch backend. Calls the GET /sdk/v1/users/me endpoint. Requires an active session.

Kotlin:

StytchConsumer.user.getUser()

iOS:

let response = try await StytchConsumer.user.getUser()

React Native:

StytchConsumer.user.getUser()

Return

GetMeResponse containing the full user object with all registered authentication factors.

Throws

StytchError

if the request fails or no active session exists.

if the coroutine is cancelled.