js-miniapp-sdk

Globals / UserInfoProvider

Interface: UserInfoProvider

Interfaces to retrieve User profile related information.

Hierarchy

Index

Methods

Methods

getAccessToken

getAccessToken(): Promise<AccessTokenData>

Defined in js-miniapp-sdk/src/miniapp.ts:148

Fetches the access token from host app.

Returns: Promise<AccessTokenData>

Access token from native host app.


getContacts

getContacts(): Promise<Contact[]>

Defined in js-miniapp-sdk/src/miniapp.ts:142

Fetches the contact list from host app. You should request the CustomPermissionName.CONTACT_LIST permission before using this method.

Returns: Promise<Contact[]>

Contact list in the host app user profile.


getProfilePhoto

getProfilePhoto(): Promise<string>

Defined in js-miniapp-sdk/src/miniapp.ts:135

Fetches the profile photo URI from host app. You should request the CustomPermissionName.PROFILE_PHOTO permission before using this method.

Returns: Promise<string>

Profile photo saved in the host app user profile.


getUserName

getUserName(): Promise<string>

Defined in js-miniapp-sdk/src/miniapp.ts:128

Fetches the username from host app. You should request the CustomPermissionName.USER_NAME permission before using this method.

Returns: Promise<string>

Username saved in the host app user profile.