getCommunityToken abstract method

Future<VKWebAppCommunityAccessTokenResult> getCommunityToken({
  1. required int appId,
  2. required int groupId,
  3. required String scope,
})

VKWebAppGetCommunityToken allows you to request access rights and get a key to work with the API on behalf of the community. Only the community administrator can obtain a community access token.

For further work, get the access key of the user with scope = groups rights and make a request to the groups.get method with the filter = admin parameter to get a list of the IDs of the administered groups.

Platforms: iOS, Android, Web, Mobile Web

appId - app ID. groupId - group ID. scope - list of access rights, separated by commas. Available Values: stories - access to stories. photos - access to photos. app_widget - Access to community widgets. messages - access to community messages. docs - access to documents. manage - access to community administration.

Implementation

Future<VKWebAppCommunityAccessTokenResult> getCommunityToken({
  required int appId,
  required int groupId,
  required String scope,
});