Chuyển tới nội dung chính

SDK 1.0.0

User

Permission: user.profile.

const user = await sdk.getUser()
// { name, patron?, firstName?, lastName?, church?, role? } — or null
  • name is the display name, already formatted for the user's language (Vietnamese order: saint name + family name + given name). Show it as is; do not rebuild it from the parts.
  • null means the app has no profile loaded (for example, a user who has not signed in).
  • There is no user id or email. Mini apps never receive the user's account credentials.