Globals / UserInfoProvider
Interface: UserInfoProvider
Interfaces to retrieve User profile related information.
Hierarchy
- UserInfoProvider
Index
Methods
Methods
getAccessToken
▸ getAccessToken(audience
: string, scopes
: string[]): Promise<AccessTokenData | MiniAppError>
Defined in js-miniapp-sdk/src/modules/user-info.ts:41
Fetches the access token from host app.
Parameters:
Name | Type | Description |
---|---|---|
audience |
string | one of the audiences provided in MiniApp manifest |
scopes |
string[] | scopes array associated to the audience |
Returns: Promise<AccessTokenData | MiniAppError>
Access token from native host app.
getContacts
▸ getContacts(): Promise<Contact[]>
Defined in js-miniapp-sdk/src/modules/user-info.ts:33
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.
getPhoneNumber
▸ getPhoneNumber(): Promise<string>
Defined in js-miniapp-sdk/src/modules/user-info.ts:56
Fetches the Phone number of the user.
Returns: Promise<string>
Phone number saved in the host app user profile.
getPoints
▸ getPoints(): Promise<Points>
Defined in js-miniapp-sdk/src/modules/user-info.ts:50
Fetches the points from host app.
Returns: Promise<Points>
Points from native host app.
getProfilePhoto
▸ getProfilePhoto(): Promise<string>
Defined in js-miniapp-sdk/src/modules/user-info.ts:26
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/modules/user-info.ts:19
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.