Bridge library for VK Mini Apps to communicate with VK clients across iOS, Android, and Web platforms
—
Social interactions including sharing, wall posts, communities, stories, and VK platform integration for connecting users and content.
Share links and content with VK users and communities.
/**
* Share content with VK users
* @param props.link - URL to share (optional)
*/
function send(method: 'VKWebAppShare', props?: {
link?: string;
}): Promise<LinkShareResult[]>;
interface LinkShareResult {
type: string;
data: any;
}Join, leave, and interact with VK communities.
/**
* Join a VK community
* @param props.group_id - Community ID to join
*/
function send(method: 'VKWebAppJoinGroup', props: {
group_id: number;
}): Promise<{ result: true }>;
/**
* Leave a VK community
* @param props.group_id - Community ID to leave
*/
function send(method: 'VKWebAppLeaveGroup', props: {
group_id: number;
}): Promise<{ result: true }>;
/**
* Get community information
* @param props.group_id - Community ID
*/
function send(method: 'VKWebAppGetGroupInfo', props: {
group_id: number;
}): Promise<GroupInfo>;
interface GroupInfo {
id: number;
name: string;
screen_name: string;
photo_100: string;
photo_200: string;
}Create and manage wall posts on user or community walls.
/**
* Show wall post creation dialog
* @param props - Wall post configuration
*/
function send(method: 'VKWebAppShowWallPostBox', props: WallPostRequestOptions): Promise<{
post_id: number | string;
}>;
interface WallPostRequestOptions {
message?: string;
attachments?: string;
owner_id?: number;
friends_only?: 0 | 1;
from_group?: 0 | 1;
signed?: 0 | 1;
}
/**
* Open existing wall post
* @param props.post_id - Post ID
* @param props.owner_id - Post owner ID
*/
function send(method: 'VKWebAppOpenWallPost', props: {
post_id: number;
owner_id: number;
}): Promise<{ result: true }>;Create and manage VK Stories.
/**
* Show story creation interface
* @param props - Story creation options
*/
function send(method: 'VKWebAppShowStoryBox', props: ShowStoryBoxOptions): Promise<{
result: true;
}>;
interface ShowStoryBoxOptions {
background_type?: 'image' | 'video';
url?: string;
stickers?: Array<{
sticker_type: string;
sticker: any;
}>;
}
/**
* Subscribe to story app updates
* @param props.story_owner_id - Story owner ID
* @param props.story_id - Story ID
* @param props.sticker_id - Sticker ID
* @param props.access_key - Access key (optional)
*/
function send(method: 'VKWebAppSubscribeStoryApp', props: {
story_owner_id: number;
story_id: number;
sticker_id: number;
access_key?: string;
}): Promise<{ access_key: string }>;Add app to community and manage community interactions.
/**
* Add app to community
* @param props.hide_success_modal - Hide success confirmation (optional)
*/
function send(method: 'VKWebAppAddToCommunity', props?: {
hide_success_modal?: boolean;
}): Promise<{ group_id: number }>;
/**
* Allow messages from community
* @param props.group_id - Community ID
* @param props.key - Authorization key (optional)
*/
function send(method: 'VKWebAppAllowMessagesFromGroup', props: {
group_id: number;
key?: string;
}): Promise<{ result: true }>;Install with Tessl CLI
npx tessl i tessl/npm-vkontakte--vk-bridge