### Getting Started: Step 1 - Understand the API Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/00-START-HERE.md Begin by reading the README.md file to get an overview of the API and integration guide. Estimated time is 10 minutes. ```text Read: README.md Time: 10 minutes ``` -------------------------------- ### Getting Started: Step 6 - Implement Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/00-START-HERE.md Use the documentation as a reference to build your integration. The time required varies by project. ```text Use: The documentation as reference Build: Your integration Time: Varies by project ``` -------------------------------- ### Getting Started: Step 3 - Learn the Details Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/00-START-HERE.md Consult the relevant -api.md file to learn method signatures and responses. Allow 15-30 minutes for this step. ```text Read: Relevant -api.md file Learn: Method signatures and responses Time: 15-30 minutes ``` -------------------------------- ### Getting Started: Step 2 - Choose Your Module Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/00-START-HERE.md Select the appropriate module by reading modules.md and identifying your use case. This step is estimated to take 5 minutes. ```text Read: modules.md Find: Your use case Time: 5 minutes ``` -------------------------------- ### Getting Started: Step 4 - Understand Auth & Limits Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/00-START-HERE.md Review configuration.md to understand authentication tokens and rate limits. This step should take approximately 10 minutes. ```text Read: configuration.md Understand: Tokens and rate limits Time: 10 minutes ``` -------------------------------- ### Example VK API GET Request Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/endpoints.md Demonstrates a GET request to retrieve user information, including specific fields and API version. ```HTTP GET https://api.vk.com/method/users.get?user_ids=1,2,3&fields=nickname,photo_big&access_token=YOUR_TOKEN&v=5.199 ``` -------------------------------- ### Manage Photos Examples Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/README.md Workflow for uploading photos, involving getting an upload server URL, uploading the file via POST, and finalizing the upload. ```text photos.getUploadServer() → get upload URL [POST to upload_url with photo file] photos.save() → finalize upload ``` -------------------------------- ### Getting Started: Step 5 - Plan Error Handling Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/00-START-HERE.md Read errors.md to understand possible error codes and plan your error handling strategy. This step is estimated to take 10 minutes. ```text Read: errors.md Understand: Possible error codes Time: 10 minutes ``` -------------------------------- ### Basic VK API Request Example Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/README.md Demonstrates a GET request to the users.get method, including user IDs, requested fields, access token, and API version. Shows a sample JSON response for user data. ```json GET /method/users.get?user_ids=1,2&fields=nickname&access_token=YOUR_TOKEN&v=5.199 { "response": [ { "id": 1, "first_name": "Pavel", "last_name": "Durov", "nickname": "durov" } ] } ``` -------------------------------- ### VK API Example Request and Response Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/00-START-HERE.md A concrete example demonstrating how to call the 'users.get' method to retrieve basic user information, including a sample JSON response. ```http GET https://api.vk.com/method/users.get?user_ids=1,2&fields=photo_big&access_token=...&v=5.199 {"response": [ {"id": 1, "first_name": "Pavel", "photo_big": "..."}, {"id": 2, "first_name": "Ilya", "photo_big": "..."} ]} ``` -------------------------------- ### Minimal VK API Request Example Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/README.md This JavaScript example demonstrates how to fetch user information, including nickname and photo, using the VK API. It includes basic error handling for API responses. ```javascript // Get user info const response = await fetch( 'https://api.vk.com/method/users.get?' + 'user_ids=1&' + 'fields=nickname,photo_50&' + 'access_token=YOUR_TOKEN&' + 'v=5.199' ); const data = await response.json(); if (data.response) { console.log(data.response[0]); } else if (data.error) { console.error(data.error.error_msg); } ``` -------------------------------- ### calls.start Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/endpoints.md Starts a call. ```APIDOC ## calls.start ### Description Starts a call. ### Method (Not specified in source) ### Endpoint (Not specified in source) ### Parameters (Not specified in source) ### Request Example (Not specified in source) ### Response #### Success Response (200) (Not specified in source) #### Response Example (Not specified in source) ``` -------------------------------- ### Schema Combination Example Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/schema-structure.md Demonstrates how multiple schema files are combined at runtime using the '$ref' keyword. ```text users/methods.json ├─ references users/objects.json ├─ references users/responses.json └─ references ../base/objects.json ``` -------------------------------- ### widgets.getPages Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/endpoints.md Gets a list of application/site pages where the Comments widget is installed. ```APIDOC ## widgets.getPages ### Description Gets a list of application/site pages where the [vk.com/dev/Comments|Comments widget] is installed. ### Method GET (assumed) ### Endpoint /method/widgets.getPages ### Parameters #### Query Parameters - **access_token** (string) - Required - User's access key. - **v** (string) - Required - API version. - **owner_id** (integer) - Optional - ID of the user or community that owns the pages. - **count** (integer) - Optional - Number of pages to return. - **offset** (integer) - Optional - Offset needed to return a specific subset of pages. ### Request Example ```json { "access_token": "", "v": "5.131", "owner_id": 12345, "count": 10 } ``` ### Response #### Success Response (200) - **response** (object) - An object containing the list of pages. - **count** (integer) - Total number of pages found. - **items** (array) - Array of page objects. #### Response Example ```json { "response": { "count": 3, "items": [ { "page_id": "page1", "title": "Page One" } ] } } ``` ``` -------------------------------- ### Offset-Based Pagination Example Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/endpoints.md Demonstrates how to retrieve paginated data using offset and count parameters. ```json GET /method/users.get?offset=0&count=100&access_token=... { "response": { "count": 5000, // Total items "items": [...] // Page of items } } ``` -------------------------------- ### Quick Polls Example Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/polls-api.md Demonstrates the creation of a quick poll, adding options, voting, and retrieving the poll by ID. ```APIDOC ## Quick Polls This use case outlines the steps to create a quick poll, add fields (options), allow users to vote, and then retrieve the poll details. ### Steps: 1. **Create Poll**: `polls.create(question, is_anonymous=true)` 2. **Add Field**: `polls.addField(owner_id, poll_id, "Option 1")` 3. **Add Field**: `polls.addField(owner_id, poll_id, "Option 2")` 4. **Vote**: `polls.vote(owner_id, poll_id, [1])` 5. **Get Poll**: `polls.getById(owner_id, [poll_id])` ``` -------------------------------- ### Schema Versioning Example Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/schema-structure.md Illustrates the format for schema version strings, which follows an X.YYY pattern for major and minor/patch versions. ```text Version string format: X.YYY - X = Major version - YYY = Minor/patch version Example: 5.199 Current: 5.199 ``` -------------------------------- ### Offset-Based Pagination Example Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/endpoints.md Demonstrates how to paginate through results using the `offset` and `count` parameters for methods that return large datasets. ```APIDOC ## GET /method/users.get ### Description Retrieves a list of users, supporting pagination to handle large result sets. ### Method GET ### Endpoint /method/users.get ### Parameters #### Query Parameters - **offset** (integer) - Required - Starting position for the returned items. - **count** (integer) - Required - Number of items to return per page. Recommended values are 50-200. - **access_token** (string) - Required - The access token for authentication. ### Request Example ```json GET /method/users.get?offset=0&count=100&access_token=... ``` ### Response #### Success Response (200) - **response** (object) - Contains the pagination details and the items. - **count** (integer) - Total number of items available. - **items** (array) - An array containing the page of items. #### Response Example ```json { "response": { "count": 5000, "items": [...] } } ``` ``` -------------------------------- ### Simple Object Response Example Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/modules.md Illustrates a basic JSON response containing a single object. ```json { "response": { "id": 123, "name": "John" } } ``` -------------------------------- ### Rate Limit Headers Example Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/endpoints.md Response headers indicating remaining requests and reset time. ```text X-RateLimit-Remaining: X-RateLimit-Reset: ``` -------------------------------- ### Manage Wall Posts Examples Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/README.md Provides methods for interacting with user wall posts, including creation, retrieval, commenting, and deletion. ```text wall.post() → create new post wall.get() → retrieve posts wall.addComment() → add comment wall.delete() → remove post ``` -------------------------------- ### Community Polls Example Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/polls-api.md Illustrates how to create and manage polls within a community or group context. ```APIDOC ## Community Polls This use case focuses on creating and interacting with polls specifically for a community or group, indicated by a negative `owner_id`. ### Steps: 1. **Create Poll**: `polls.create(question, owner_id=-groupid)` 2. **Add Field**: `polls.addField(owner_id=-groupid, poll_id, answer)` 3. **Vote**: `polls.vote(owner_id=-groupid, poll_id, [answer_id])` ``` -------------------------------- ### JSON Schema Format Hint Example Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/schema-structure.md Illustrates using a format hint to specify the expected format of an integer type, such as int64. ```json { "type": "integer", "format": "int64" } ``` -------------------------------- ### account.getPushSettings Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/endpoints.md Gets settings of push notifications. ```APIDOC ## account.getPushSettings ### Description Gets settings of push notifications. ### Method GET ### Endpoint /method/account.getPushSettings ### Parameters #### Query Parameters - **access_token** (string) - Required - User's access token. - **v** (string) - Required - API version. #### Request Body (No specific request body documented for this method in the source.) ### Response #### Success Response (200) (No specific success response fields documented for this method in the source.) ``` -------------------------------- ### Example VK API POST Request Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/endpoints.md Illustrates a POST request for sending a message, including necessary content type and parameters. ```HTTP POST https://api.vk.com/method/messages.send Content-Type: application/x-www-form-urlencoded peer_id=123456&message=Hello%20World&access_token=YOUR_TOKEN&v=5.199 ``` -------------------------------- ### JSON Schema Reference Example Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/schema-structure.md Shows how to reference another type definition within the schema, typically from an objects.json file. ```json { "$ref": "objects.json#/definitions/user" } ``` -------------------------------- ### Fetch User Data Example Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/README.md Use this method to retrieve user objects with specific fields. Requires user IDs and desired fields as parameters. ```text users.get(user_ids, fields) → returns user objects with requested fields ``` -------------------------------- ### Paginated Response Example Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/modules.md Demonstrates a JSON response structure for paginated data, including total count and items. ```json { "response": { "count": 10000, "items": [...] } } ``` -------------------------------- ### Array Response Example Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/modules.md Shows a JSON response where the 'response' field contains an array of objects. ```json { "response": [ {"id": 1, "name": "User 1"}, {"id": 2, "name": "User 2"} ] } ``` -------------------------------- ### photos.upload Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/photos-api.md Gets an upload server URL for photos. This is the first step in uploading a photo. ```APIDOC ## photos.upload ### Description Gets an upload server URL for photos. This is the first step in uploading a photo. ### Method GET ### Endpoint /method/photos.getUploadServer ### Parameters #### Query Parameters - **group_id** (integer) - Optional - Group ID for album upload - **album_id** (integer) - Optional - Album ID (format: int64) - **compress** (boolean) - Optional - Compress photo ### Response #### Success Response (200) - **upload_url** (string) - The URL for uploading the photo. - **album_id** (integer) - The album ID. - **user_id** (integer) - The user ID. #### Response Example ```json { "response": { "upload_url": "https://upload.vk.com/...", "album_id": 123, "user_id": 456 } } ``` ``` -------------------------------- ### Board Polls Example Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/polls-api.md Shows how to cast a vote in a poll that is part of a board or discussion. ```APIDOC ## Board Polls This use case demonstrates how to vote in a poll that is designated as a board poll. ### Method: `polls.vote(owner_id, poll_id, [answer_id], is_board=true)` ``` -------------------------------- ### JSON Schema Union Type Example Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/schema-structure.md Demonstrates how to define a field that can accept multiple types (integer or string). ```json { "type": ["integer", "string"] } ``` -------------------------------- ### Error Response Example Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/modules.md Illustrates the structure of a JSON error response, including error code, message, and text. ```json { "error": { "error_code": 7, "error_msg": "Permission denied", "error_text": "User has no rights to perform this action" } } ``` -------------------------------- ### Send and Retrieve Messages Examples Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/README.md Methods for sending messages to users and retrieving message history. The send method returns the message ID upon success. ```text messages.send(peer_id, message) → send message, returns message_id messages.get() → retrieve message history ``` -------------------------------- ### Post Content with Photo Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/INDEX.md Workflow for uploading a photo and posting it to a user's wall. This involves getting an upload server, uploading the photo, saving it, and then posting it as an attachment. ```text 1. photos.getUploadServer() → get upload URL 2. POST photo to upload_url → upload file 3. photos.save(server_response) → save photo 4. wall.post(attachments=[photo]) → post with photo ``` -------------------------------- ### VK API Request and Response Formats Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/endpoints.md Details the standard format for making requests to the VK API, including URL structure, common query parameters, and examples for GET and POST requests. It also outlines the structure of success, error, and batch responses. ```APIDOC ## HTTP Request Format All VK API methods use the same HTTP request format. ### Request Structure **URL:** ``` https://api.vk.com/method/{method_name} ``` **Query Parameters:** ``` access_token= v=5.199 [method-specific parameters] ``` ### Example Request ``` GET https://api.vk.com/method/users.get?user_ids=1,2,3&fields=nickname,photo_big&access_token=YOUR_TOKEN&v=5.199 POST https://api.vk.com/method/messages.send Content-Type: application/x-www-form-urlencoded peer_id=123456&message=Hello%20World&access_token=YOUR_TOKEN&v=5.199 ``` ## Response Format ### Success Response ```json { "response": { // Response data depends on method } } ``` ### Error Response ```json { "error": { "error_code": 7, "error_msg": "Permission denied", "error_text": "User authorization failed" } } ``` ### Batch Response When using `execute` method with multiple API calls: ```json { "response": [ // Array of individual responses ], "execute_errors": [ { "error_code": 15, "error_msg": "Access denied", "method": "users.get" } ] } ``` ## HTTP Methods - **GET** — For read operations (retrieving data) - **POST** — For write operations (creating, updating, deleting) ## Request Parameters ### Common Parameters (All Methods) | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `access_token` | string | Yes* | OAuth access token | | `v` | string | Yes | API version (e.g., "5.199") | *Required except for public/open methods ### Method-Specific Parameters Each method defines its own parameters with types, required status, defaults, and validation rules. Refer to individual module documentation. ``` -------------------------------- ### Get App Permissions Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/account-api.md Gets application permissions for the current user or a specified user ID. Returns a bitmask of granted permissions. ```json GET /method/account.getAppPermissions?user_id=1&access_token=...&v=5.199 { "response": 69206 } ``` -------------------------------- ### Timestamp to Date Conversion Examples Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/endpoints.md Convert Unix timestamps to human-readable dates using platform-specific functions. Examples are provided for JavaScript and Python. ```javascript Date = new Date(timestamp * 1000) ``` ```python date = datetime.fromtimestamp(timestamp) ``` -------------------------------- ### Polls.getById Response Example Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/polls-api.md This is an example of the JSON response structure when using the polls.getById method. It details a single poll with its answers, vote counts, and various properties. ```json { "response": [ { "id": 123456789, "owner_id": 1, "created": 1634567890, "question": "What is your favorite color?", "votes": 42, "answer_id": 1, "answers": [ { "id": 1, "text": "Red", "votes": 15, "rate": 35.71 }, { "id": 2, "text": "Blue", "votes": 18, "rate": 42.86 }, { "id": 3, "text": "Green", "votes": 9, "rate": 21.43 } ], "is_anonymous": true, "is_multiple": false, "can_vote": true, "can_edit": false, "can_report": true, "can_share": true, "end_date": 0 } ] } ``` -------------------------------- ### messages.getMessagesReactions Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/endpoints.md Get reaction counters for message ```APIDOC ## messages.getMessagesReactions ### Description Get reaction counters for message. ### Method GET (assumed, as it retrieves data) ### Endpoint /method/messages.getMessagesReactions ### Parameters #### Path Parameters None explicitly mentioned. #### Query Parameters - **message_id** (integer) - Required - Message ID. - **group_id** (integer) - Optional - Group ID. ### Request Example ```json { "message_id": 12345, "group_id": 67890 } ``` ### Response #### Success Response (200) - **response** (object) - API response object containing reaction counters. #### Response Example ```json { "response": { "reactions": [ { "reaction_id": "like", "count": 10 } ] } } ``` ``` -------------------------------- ### Create Content Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/INDEX.md Shows how to create content, such as a wall post, using a POST request. ```APIDOC ## POST /method/wall.post ### Description Creates a new post on a user's wall. ### Method POST ### Endpoint /method/wall.post ### Query Parameters - **message** (string) - Required - The text of the post. - **access_token** (string) - Required - The access token for authentication. ``` -------------------------------- ### database.getMetroStationsById Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/endpoints.md Get metro station by his id. ```APIDOC ## database.getMetroStationsById ### Description Get metro station by his id. ### Method (Not specified in source) ### Endpoint (Not specified in source) ### Parameters (Not specified in source) ### Request Example (Not specified in source) ### Response #### Success Response (200) (Not specified in source) #### Response Example (Not specified in source) ``` -------------------------------- ### database.getMetroStations Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/endpoints.md Get metro stations by city. ```APIDOC ## database.getMetroStations ### Description Get metro stations by city. ### Method (Not specified in source) ### Endpoint (Not specified in source) ### Parameters (Not specified in source) ### Request Example (Not specified in source) ### Response #### Success Response (200) (Not specified in source) #### Response Example (Not specified in source) ``` -------------------------------- ### account.getAppPermissions Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/endpoints.md Gets settings of the user in this application. ```APIDOC ## account.getAppPermissions ### Description Gets settings of the user in this application. ### Method GET ### Endpoint /method/account.getAppPermissions ### Parameters #### Query Parameters - **access_token** (string) - Required - User's access token. - **v** (string) - Required - API version. #### Request Body (No specific request body documented for this method in the source.) ### Response #### Success Response (200) (No specific success response fields documented for this method in the source.) ``` -------------------------------- ### store.getProducts Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/endpoints.md Retrieves available products. ```APIDOC ## store.getProducts ### Description Retrieves available products. ### Method Not specified (likely GET) ### Endpoint Not specified ### Parameters None specified ``` -------------------------------- ### messages.getReactionsAssets Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/endpoints.md Get assets to display message reactions ```APIDOC ## messages.getReactionsAssets ### Description Get assets to display message reactions. ### Method GET (assumed, as it retrieves data) ### Endpoint /method/messages.getReactionsAssets ### Parameters #### Path Parameters None explicitly mentioned. #### Query Parameters None explicitly mentioned. ### Request Example ```json {} ``` ### Response #### Success Response (200) - **response** (object) - API response object containing reaction assets. #### Response Example ```json { "response": { "reactions": [ { "id": "like", "static_url": "..." } ] } } ``` ``` -------------------------------- ### messages.getReactedPeers Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/endpoints.md Get reacted users and counters for message ```APIDOC ## messages.getReactedPeers ### Description Get reacted users and counters for message. ### Method GET (assumed, as it retrieves data) ### Endpoint /method/messages.getReactedPeers ### Parameters #### Path Parameters None explicitly mentioned. #### Query Parameters - **message_id** (integer) - Required - Message ID. - **reaction_id** (string) - Required - Reaction ID. - **group_id** (integer) - Optional - Group ID. ### Request Example ```json { "message_id": 12345, "reaction_id": "like", "group_id": 67890 } ``` ### Response #### Success Response (200) - **response** (object) - API response object containing reacted peers and counters. #### Response Example ```json { "response": { "peers": [ { "peer_id": 100, "count": 5 } ] } } ``` ``` -------------------------------- ### List with Pagination Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/INDEX.md Demonstrates how to fetch lists of items with pagination parameters like offset and count. ```APIDOC ## GET /method/messages.get ### Description Retrieves a list of messages with pagination. ### Method GET ### Endpoint /method/messages.get ### Query Parameters - **offset** (integer) - Optional - Offset for pagination, defaults to 0. - **count** (integer) - Optional - Number of items to return, defaults to 100. - **access_token** (string) - Required - The access token for authentication. ``` -------------------------------- ### Status Module Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/modules.md Allows users to get and set their status. ```APIDOC ## Status Module ### Description Allows users to get and set their status. ### Methods - status.get - status.set ``` -------------------------------- ### widgets.getComments Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/endpoints.md Gets a list of comments for the page added through the Comments widget. ```APIDOC ## widgets.getComments ### Description Gets a list of comments for the page added through the [vk.com/dev/Comments|Comments widget]. ### Method GET (assumed) ### Endpoint /method/widgets.getComments ### Parameters #### Query Parameters - **access_token** (string) - Required - User's access key. - **v** (string) - Required - API version. - **owner_id** (integer) - Optional - ID of the user or community that owns the page. - **page_id** (string) - Required - Page ID. - **url** (string) - Optional - URL of the page where the widget is installed. - **count** (integer) - Optional - Number of comments to return. - **offset** (integer) - Optional - Offset needed to return a specific subset of comments. - **need_likes** (boolean) - Optional - 1 - to return the 'likes' field for each comment. ### Request Example ```json { "access_token": "", "v": "5.131", "page_id": "example_page", "count": 10 } ``` ### Response #### Success Response (200) - **response** (object) - An object containing the list of comments. - **count** (integer) - Total number of comments found. - **items** (array) - Array of comment objects. #### Response Example ```json { "response": { "count": 5, "items": [ { "id": 10001, "text": "Great article!" } ] } } ``` ``` -------------------------------- ### apps.get Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/endpoints.md Returns applications data. ```APIDOC ## apps.get ### Description Returns applications data. ### Method (Not specified in source) ### Endpoint (Not specified in source) ### Parameters (Not specified in source) ### Request Example (Not specified in source) ### Response #### Success Response (200) (Not specified in source) #### Response Example (Not specified in source) ``` -------------------------------- ### account.getAppPermissions Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/account-api.md Gets application permissions for the current user. Returns a bitmask of granted permissions. ```APIDOC ## GET account.getAppPermissions ### Description Gets application permissions for the current user. Returns a bitmask of granted permissions. ### Method GET ### Endpoint /method/account.getAppPermissions ### Parameters #### Query Parameters - **user_id** (integer) - Optional - User ID (format: int64) ### Request Example ```json GET /method/account.getAppPermissions?user_id=1&access_token=...&v=5.199 ``` ### Response #### Success Response (200) - **response** (integer) - A bitmask of granted permissions #### Response Example ```json { "response": 69206 } ``` ``` -------------------------------- ### market.getProductPhotoUploadServer Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/endpoints.md Returns the server address for uploading market item photos. Requires 'user' scope. ```APIDOC ## market.getProductPhotoUploadServer ### Description Returns the server address for market photo upload. ### Method GET (Assumed, as it retrieves data) ### Endpoint /method/market.getProductPhotoUploadServer ### Scope user ``` -------------------------------- ### Authenticate Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/INDEX.md Demonstrates the basic pattern for authenticating with the VK API using an access token. ```APIDOC ## GET /method/METHOD_NAME ### Description Authenticates with the VK API using a provided access token. ### Method GET ### Endpoint /method/METHOD_NAME ### Query Parameters - **access_token** (string) - Required - The access token for authentication. - **v** (string) - Required - The API version to use (e.g., 5.199). ``` -------------------------------- ### friends.getAppUsers Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/endpoints.md Returns a list of IDs of the current user's friends who installed the application. ```APIDOC ## friends.getAppUsers ### Description Returns a list of IDs of the current user's friends who installed the application. ### Method GET (assumed) ### Endpoint /method/friends.getAppUsers ### Parameters #### Query Parameters - **access_token** (string) - Required - Access token - **v** (string) - Required - API version *Note: Specific parameters for this method are not detailed in the source.* ``` -------------------------------- ### execute Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/endpoints.md Executes a batch of VK API methods. ```APIDOC ## execute ### Description Executes a batch of VK API methods. ### Method POST (assumed) ### Endpoint /method/execute ### Parameters #### Query Parameters - **access_token** (string) - Required - Access token - **v** (string) - Required - API version #### Request Body - **code** (string) - Required - Code for execution *Note: Specific parameters for this method are not detailed in the source.* ``` -------------------------------- ### photos.createAlbum Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/endpoints.md Creates an empty photo album. ```APIDOC ## photos.createAlbum ### Description Creates an empty photo album. ### Method (Not specified in source) ### Endpoint (Not specified in source) ### Parameters (Not specified in source) ### Request Example (Not specified in source) ### Response (Not specified in source) ``` -------------------------------- ### Simple Reference Response Configuration Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/configuration.md Defines a response using a simple JSON reference. Use this for straightforward response structures. ```json { "response": { "$ref": "responses.json#/definitions/base_ok_response" } } ``` -------------------------------- ### market.add Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/endpoints.md Adds a new item to the market. Requires 'user' scope. ```APIDOC ## market.add ### Description Ads a new item to the market. ### Method POST (Assumed, as it modifies data) ### Endpoint /method/market.add ### Scope user ``` -------------------------------- ### prettyCards.create Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/endpoints.md Creates a pretty card. ```APIDOC ## prettyCards.create ### Description Creates a pretty card. ### Method (Not specified in source) ### Endpoint (Not specified in source) ### Parameters (Not specified in source) ### Request Example (Not specified in source) ### Response (Not specified in source) ``` -------------------------------- ### video.save Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/video-api.md Gets the URL for uploading a video file to VK servers. This is the first step in a two-stage upload process. ```APIDOC ## video.save ### Description Gets the URL for uploading a video file to VK servers. This is the first step in a two-stage upload process. ### Method POST ### Endpoint /method/video.save ### Parameters #### Request Body - **name** (string) - Optional - Video title (max 250 chars) - **description** (string) - Optional - Video description (max 2048 chars) - **is_private** (boolean) - Optional - Private video (friends only) (Default: false) - **wallpost** (boolean) - Optional - Post to wall after upload (Default: false) - **link** (string) - Optional - External video link (YouTube, etc.) - **group_id** (integer) - Optional - Group ID (format: int64) - **album_id** (integer) - Optional - Album ID - **privacy_view** (array of string) - Optional - Privacy for viewing - **privacy_comment** (array of string) - Optional - Privacy for commenting ### Request Example ```json POST /method/video.save Content-Type: application/x-www-form-urlencoded name=My%20Video&description=Test&is_private=0&access_token=...&v=5.199 ``` ### Response #### Success Response (200) - **upload_url** (string) - URL for uploading the video file. - **video_id** (integer) - The ID of the video. - **owner_id** (integer) - The owner ID of the video. #### Response Example ```json { "response": { "upload_url": "https://upload.vk.com/…", "video_id": 789012, "owner_id": 1 } } ``` ``` -------------------------------- ### stories.getVideoUploadServer Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/endpoints.md Allows to receive URL for uploading story with video. ```APIDOC ## stories.getVideoUploadServer ### Description Allows to receive URL for uploading story with video. ### Method Not specified (likely GET) ### Endpoint Not specified ### Parameters None specified ``` -------------------------------- ### Get Advertising Accounts Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/ads-api.md Retrieves a list of advertising accounts available to the user. Requires a user access token. ```json GET /method/ads.getAccounts?access_token=...&v=5.199 { "response": [ { "account_id": 1234567, "account_name": "Company Brand", "account_type": "general", "access_role": "admin" } ] } ``` -------------------------------- ### Get Account Info Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/account-api.md Retrieves information about the current account and its status. Specify fields to return specific details. ```json GET /method/account.getInfo?fields=country,language&access_token=...&v=5.199 { "response": { "country": 643, "https_required": 1, "own_posts_default": 1, "no_wall_replies": 0, "intro": 0, "lang": 0, "status_default": 0, "wall_default": 0 } } ``` -------------------------------- ### account.setPushSettings Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/endpoints.md Change push settings. ```APIDOC ## account.setPushSettings ### Description Change push settings. ### Method POST ### Endpoint /method/account.setPushSettings ### Parameters #### Query Parameters - **access_token** (string) - Required - User's access token. - **v** (string) - Required - API version. #### Request Body (No specific request body documented for this method in the source.) ### Response #### Success Response (200) (No specific success response fields documented for this method in the source.) ``` -------------------------------- ### City ID in VK API Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/endpoints.md Specify cities using their numerical ID. For example, 1 represents Moscow. ```json "city": 1 ``` -------------------------------- ### storage.getKeys Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/endpoints.md Returns the names of all variables. ```APIDOC ## storage.getKeys ### Description Returns the names of all variables. ### Method Not specified (likely GET) ### Endpoint Not specified ### Parameters None specified ``` -------------------------------- ### Country ID in VK API Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/endpoints.md Specify countries using their numerical ID. For example, 643 represents Russia. ```json "country": 643 ``` -------------------------------- ### groups.create Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/groups-api.md Creates a new community with a specified name, description, and type. Requires user access token. ```APIDOC ## POST /method/groups.create ### Description Creates a new community. This method allows users to create a new group, page, or event. ### Method POST ### Endpoint /method/groups.create ### Parameters #### Query Parameters - **title** (string) - Required - Community name (max 255 characters) - **description** (string) - Optional - Community description - **type** (string) - Required - Community type: `group`, `page`, `event` - **subtype** (string) - Optional - Subtype for specialization - **public_category** (integer) - Optional - Category ID for public page - **access_token** (string) - Required - User access token - **v** (string) - Required - API version ### Request Example ```json POST /method/groups.create Content-Type: application/x-www-form-urlencoded title=My%20Test%20Group&description=Test%20group&type=group&access_token=...&v=5.199 ``` ### Response #### Success Response (200) - **response** (integer) - The ID of the newly created group. #### Response Example ```json { "response": 123456789 } ``` ``` -------------------------------- ### market.addAlbum Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/endpoints.md Creates a new collection of items. Requires 'user' scope. ```APIDOC ## market.addAlbum ### Description Creates new collection of items ### Method POST (Assumed, as it modifies data) ### Endpoint /method/market.addAlbum ### Scope user ``` -------------------------------- ### JSON Schema Enumeration Example Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/schema-structure.md Defines an enumeration for a string type, specifying allowed values and their corresponding names. ```json { "type": "string", "enum": ["yes", "no"], "enumNames": ["Yes", "No"] } ``` -------------------------------- ### docs.getWallUploadServer Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/endpoints.md Returns the server address for document upload onto a user's or community's wall. ```APIDOC ## docs.getWallUploadServer ### Description Returns the server address for document upload onto a user's or community's wall. ### Method GET (assumed) ### Endpoint /method/docs.getWallUploadServer ### Parameters #### Query Parameters - **access_token** (string) - Required - Access token - **v** (string) - Required - API version *Note: Specific parameters for this method are not detailed in the source.* ``` -------------------------------- ### Method Naming Convention Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/modules.md Explains the standard naming convention for VK API methods, following a `{module}.{action}` pattern. ```APIDOC ## Method Naming Convention VK API methods follow the pattern: `{module}.{action}` | Action | Purpose | Example | |---|---|---| | `get` | Retrieve data | `users.get` | | `getById` | Retrieve specific items by ID | `groups.getById` | | `search` | Search functionality | `search.search` | | `add` | Create new item | `market.add` | | `edit` | Update existing item | `wall.edit` | | `delete` | Remove item | `messages.delete` | | `set` | Modify setting | `account.setOnline` | ``` -------------------------------- ### VK API Basic Usage Pattern Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/00-START-HERE.md This pattern illustrates the fundamental structure for making requests to the VK API. It shows the endpoint, required parameters like access token and version, and the general format of the response. ```http GET/POST https://api.vk.com/method/{module}.{method} ?access_token=YOUR_TOKEN &v=5.199 &[method parameters] Response: {"response": } or {"error": {...}} ``` -------------------------------- ### wall.post Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/wall-api.md Creates a new wall post with optional text, attachments, and scheduling. ```APIDOC ## wall.post ### Description Creates a new wall post with optional text, attachments, and scheduling. ### Method POST ### Endpoint /api/methods/wall.post ### Parameters #### Query Parameters - **owner_id** (integer) - Optional - Wall owner ID (format: int64) - **friends_only** (boolean) - Optional - Only visible to friends - **from_group** (boolean) - Optional - Post as group (group token only) - **message** (string) - Optional - Post text (max 4096 chars) - **attachments** (array of string) - Optional - Media: photo, video, audio, doc, link, poll, etc. - **services** (string) - Optional - External services JSON - **signed** (boolean) - Optional - Sign post with author name - **publish_date** (integer) - Optional - Unix timestamp to schedule post (future date) - **lat** (number) - Optional - Latitude for geotag - **long** (number) - Optional - Longitude for geotag - **place_id** (integer) - Optional - Place ID from locations - **guid** (string) - Optional - Deduplication key ### Request Example ```json POST /method/wall.post Content-Type: application/x-www-form-urlencoded owner_id=1&message=Check%20this%20out&attachments=photo1_100_abc123&signed=1&access_token=...&v=5.199 ``` ### Response #### Success Response (200) - **post_id** (integer) - ID of the newly created post #### Response Example ```json { "response": { "post_id": 98765 } } ``` ``` -------------------------------- ### Execute Module Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/modules.md Allows for executing a batch of API calls. ```APIDOC ## Execute Module ### Description Allows for executing a batch of API calls. ### Methods - execute ``` -------------------------------- ### messages.removeChatUser Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/endpoints.md Allows the current user to leave a chat or, if the current user started the chat, to remove another user from it. ```APIDOC ## messages.removeChatUser ### Description Allows the current user to leave a chat or, if the current user started the chat, to remove another user from it. ### Method POST (assumed, as it modifies data) ### Endpoint /method/messages.removeChatUser ### Parameters #### Path Parameters None explicitly mentioned. #### Query Parameters None explicitly mentioned. #### Request Body - **chat_id** (integer) - Required - Chat ID. - **user_id** (integer) - Required - ID of the user to remove. - **group_id** (integer) - Optional - Group ID. ### Request Example ```json { "chat_id": 12345, "user_id": 100, "group_id": 67890 } ``` ### Response #### Success Response (200) - **response** (integer) - Returns 1 if the user was successfully removed or left the chat. #### Response Example ```json { "response": 1 } ``` ``` -------------------------------- ### Market API Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/INDEX.md Reference for the Market module, providing methods to list, get, add, edit, and delete market items. ```APIDOC ## Market API ### Description Reference for the Market module, providing methods to list, get, add, edit, and delete market items. ### Methods - `market.get` — List items - `market.getById` — Get item info - `market.add` — Create item - `market.edit` — Update item - `market.delete` — Remove item - Currency and availability ``` -------------------------------- ### Create Content with VK API Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/INDEX.md Use this pattern for creating content, like posts, via the VK API. This typically involves a POST request with message content and an access token. ```http POST /method/wall.post?message=Hello&access_token=TOKEN ``` -------------------------------- ### users.get Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/endpoints.md Returns detailed information on users. ```APIDOC ## users.get ### Description Returns detailed information on users. ### Method Not specified (likely GET) ### Endpoint Not specified ### Parameters None specified ``` -------------------------------- ### Get Statistics Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/ads-api.md Retrieves advertising statistics for specified campaigns or ad groups. Supports daily, weekly, or monthly periods. ```vk-ads-api ads.getStatistics(account_id, ids_type='campaign', ids='123', period='day') ``` -------------------------------- ### Get Countries by Code Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/database-api.md Retrieves a list of countries, optionally filtered by country code. Useful for obtaining country-specific data. ```json GET /method/database.getCountries?code=RU&access_token=...&v=5.199 { "response": [ { "id": 643, "title": "Russian Federation" } ] } ``` -------------------------------- ### docs.get Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/endpoints.md Returns detailed information about user or community documents. ```APIDOC ## docs.get ### Description Returns detailed information about user or community documents. ### Method GET (assumed) ### Endpoint /method/docs.get ### Parameters #### Query Parameters - **access_token** (string) - Required - Access token - **v** (string) - Required - API version *Note: Specific parameters for this method are not detailed in the source.* ``` -------------------------------- ### Get Mutual Friends Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/friends-api.md Retrieves a list of mutual friends between two specified users. Use this to find common connections. ```json GET /method/friends.getMutual?source_uid=1&target_uid=2&access_token=...&v=5.199 { "response": [4, 7, 18, 21] } ``` -------------------------------- ### photos.getWallUploadServer Source: https://github.com/vkcom/vk-api-schema/blob/master/_autodocs/endpoints.md Returns the server address for photo upload onto a user's wall. ```APIDOC ## photos.getWallUploadServer ### Description Returns the server address for photo upload onto a user's wall. ### Method (Not specified in source) ### Endpoint (Not specified in source) ### Parameters (Not specified in source) ### Request Example (Not specified in source) ### Response (Not specified in source) ```