{"id":15107967,"url":"https://github.com/vksdk/vk-sdk-kotlin","last_synced_at":"2025-12-24T22:28:16.625Z","repository":{"id":57726935,"uuid":"98762513","full_name":"vksdk/vk-sdk-kotlin","owner":"vksdk","description":"Unofficial VK SDK, written in Kotlin: make bots, use the API","archived":false,"fork":false,"pushed_at":"2021-09-08T23:32:26.000Z","size":3854,"stargazers_count":69,"open_issues_count":5,"forks_count":16,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-09T16:51:54.757Z","etag":null,"topics":["bot","java","kotlin","kotlin-multiplatform","multiplatform","sdk-java","social-network","vk","vk-api","vk-sdk"],"latest_commit_sha":null,"homepage":"https://vksdk.github.io/vk-sdk-kotlin","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vksdk.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-07-29T22:46:18.000Z","updated_at":"2025-01-19T12:28:30.000Z","dependencies_parsed_at":"2022-09-11T17:02:55.467Z","dependency_job_id":null,"html_url":"https://github.com/vksdk/vk-sdk-kotlin","commit_stats":null,"previous_names":["petersamokhin/vk-bot-java-sdk"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/vksdk/vk-sdk-kotlin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vksdk%2Fvk-sdk-kotlin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vksdk%2Fvk-sdk-kotlin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vksdk%2Fvk-sdk-kotlin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vksdk%2Fvk-sdk-kotlin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vksdk","download_url":"https://codeload.github.com/vksdk/vk-sdk-kotlin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vksdk%2Fvk-sdk-kotlin/sbom","scorecard":{"id":729181,"data":{"date":"2025-08-11","repo":{"name":"github.com/vksdk/vk-sdk-kotlin","commit":"94615d3c2e50bb65e0a8853d32c9dd5f074c9570"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.3,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 1/27 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/docs_publish.yml:1","Warn: no topLevel permission defined: .github/workflows/release.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":9,"reason":"binaries present in source code","details":["Warn: binary detected: gradle/wrapper/gradle-wrapper.jar:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/docs_publish.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/vksdk/vk-sdk-kotlin/docs_publish.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/docs_publish.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/vksdk/vk-sdk-kotlin/docs_publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/vksdk/vk-sdk-kotlin/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/vksdk/vk-sdk-kotlin/release.yml/master?enable=pin","Info:   0 out of   3 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 5 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-22T13:53:09.790Z","repository_id":57726935,"created_at":"2025-08-22T13:53:09.791Z","updated_at":"2025-08-22T13:53:09.791Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002970,"owners_count":26083489,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bot","java","kotlin","kotlin-multiplatform","multiplatform","sdk-java","social-network","vk","vk-api","vk-sdk"],"created_at":"2024-09-25T21:43:30.090Z","updated_at":"2025-10-10T06:39:28.792Z","avatar_url":"https://github.com/vksdk.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# VK SDK Kotlin\n![cover](docs/images/cover.png)\n\n\u003cp align=\"center\"\u003eCreate a chat-bot for VK.com in a few lines of code, use the API and forget about the limitations\u003c/p\u003e\n\u003cp align=\"center\"\u003e\u003ca href=\"https://vk.com/vk_sdk\"\u003ehttps://vk.com/vk_sdk\u003c/a\u003e\u003c/p\u003e\n\n---\n\n![Build](https://github.com/vksdk/vk-sdk-kotlin/workflows/Release/badge.svg) ![Documentation](https://github.com/vksdk/vk-sdk-kotlin/workflows/Documentation/badge.svg) [![Kotlin 1.5.30](https://img.shields.io/badge/Kotlin-1.5.30-blue.svg?style=flat)](http://kotlinlang.org) [![API version](https://img.shields.io/badge/API%20version-5.131+-blue?style=flat\u0026logo=vk\u0026logoColor=white)](https://vk.com/dev/versions)\n[![GitHub license](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat)](https://github.com/vksdk/vk-sdk-kotlin/blob/master/LICENSE)\n\nUnofficial VK.com SDK, written in Kotlin.\nBased on Kotlin Multiplatform project, but has Java-friendly API.\n\nSee the documentation: [https://vksdk.github.io/vk-sdk-kotlin](https://vksdk.github.io/vk-sdk-kotlin)\n\nLatest version:  [![maven-central](https://img.shields.io/badge/Maven%20Central-0.0.8-yellowgreen?style=flat)](https://search.maven.org/search?q=g:com.petersamokhin.vksdk)\n\nFor Kotlin 1.3.72 use version 0.0.5 and below.\n\n## Minimal example of the echo-chatbot\n\n### Kotlin\n```kotlin\n// From here: https://vk.com/club151083290 take the ID\nval groupId = 151083290\n\n// Read more: https://vk.com/dev/access_token\nval accessToken = \"abcdef123456...\"\n\n// There are two http clients available for now: \n// JVM-only OkHttp-based\n// and common ktor-based\nval vkHttpClient = VkOkHttpClient()\n\nval client = VkApiClient(groupId, accessToken, VkApiClient.Type.Community, VkSettings(vkHttpClient))\n\nclient.onMessage { messageEvent -\u003e\n    client.sendMessage {\n        peerId = messageEvent.message.peerId\n        message = \"Hello, World!\"\n\n        // You can use stickers, replies, location, etc.\n        // All of the message parameters are supported.\n    }.execute()\n}\n\nclient.startLongPolling()\n```\n\n### Java\n```java\nint groupId = 151083290;\nString accessToken = \"abcdef123456...\";\nHttpClient vkHttpClient = new VkOkHttpClient();\n\nVkApiClient client = new VkApiClient(groupId, accessToken, VkApiClient.Type.Community, new VkSettings(vkHttpClient));\n\nclient.onMessage(event -\u003e {\n    new Message()\n        .peerId(event.getMessage().getPeerId())\n        .text(\"Hello, world!\")\n        .sendFrom(client)\n        .execute();\n});\n\nclient.startLongPolling();\n```\n\n## Features\nThe primary goal of the library is to cover most of the possible needs but in an abstract way.\nYou can't find here a hundred of pre-defined data classes for each API method, but you can write the highly customizable solution in most convenient way.\n\n- Supported platforms: JVM (+ Android), JS, darwin (iOS, macOS, tvOS, watchOS), mingwX64 (Windows), linuxX64\n- Big and detailed examples: Multiplatform project (iOS \u0026 Android), Kotlin project, Java-only project. See the `examples` directory and the [documentation](https://vksdk.github.io/vk-sdk-kotlin/usage/).\n- Written in Kotlin, but has JVM-friendly API with methods overloading, static methods, etc.\n- Modularized and highly customizable: use pre-defined HTTP-clients or write your own; combine API calls, make queues or calls lists, etc.\n- Use the client created from the `code` or from `access_token`.\n- [Bots Long Poll API](https://vk.com/dev/bots_longpoll)\n    - Event is a data class `MessageNew` for `message_new` event\n    - and the [`JsonElement`](https://github.com/Kotlin/kotlinx.serialization) for all the other events\n- Batch requests queue using [execute](https://vk.com/dev/execute) method under the hood: make up to 75+ requests per second and don't think about the [VK API limitations](https://vk.com/dev/api_requests?f=Limits%20and%20recommendations)\n    - Putting into batch requests queue is optional, but done by default for asynchronous requests\n    - Synchronous calls always sent immediately\n- API calls:\n    - Synchronous\n    - Asynchronous (using callbacks)\n    - Using [Kotlin Coroutines Flow](https://kotlinlang.org/docs/reference/coroutines/flow.html) wrapper\n- [`messages.send`](https://vk.com/dev/messages.send): use DSL for sending messages and building keyboards. All method capabilities are covered.\n    - Attach files in a couple of lines of code, using a file from disk, URL, etc.\n  \n## Install\nLibrary is uploaded to the Maven Central Repository.\n\nFor Gradle 6.0+ or with metadata enabled, add the dependencies in this way:\n```groovy\n// core module is required\nimplementation \"com.petersamokhin.vksdk:core:$vkSdkVersion\"\n\n// One of the HTTP clients is also required.\n// You can use pre-defined OkHttp-based client, but only for JVM.\nimplementation \"com.petersamokhin.vksdk:http-client-jvm-okhttp:$vkSdkVersion\"\n\n// Or else you can use the common HTTP client, which is based on ktor \n// and available for all of the platforms, including JVM.\n// In this case, you also must specify the ktor engine.\nimplementation \"com.petersamokhin.vksdk:http-client-common-ktor:$vkSdkVersion\"\n```\n\nOtherwise, add `enableFeaturePreview(\"GRADLE_METADATA\")` to `settings.gradle` or else you should specify the platform.\nExample for JVM:\n```groovy\nimplementation \"com.petersamokhin.vksdk:core-jvm:$vkSdkVersion\"\nimplementation \"com.petersamokhin.vksdk:http-client-common-ktor-jvm:$vkSdkVersion\"\n\n// and OkHttp-based client is already JVM-only\nimplementation \"com.petersamokhin.vksdk:http-client-jvm-okhttp:$vkSdkVersion\"\n```\n\n## Limitations\n#### Unsupported platforms\n- `linuxArm32Hfp`, `linuxMips32`\n    - [https://github.com/Kotlin/kotlinx.coroutines/issues/855](https://github.com/Kotlin/kotlinx.coroutines/issues/855)\n\n#### Unsupported functionality\n- Attachment of a file (i.e. access to filesystem) is available only for JS, JVM and darwin. The other platform implementations may be in todo. \n- Synchronous calls for `js` platform\n    - [https://github.com/Kotlin/kotlinx.coroutines/issues/195#issuecomment-354458878](https://github.com/Kotlin/kotlinx.coroutines/issues/195#issuecomment-354458878)\n\n## 3rd party\n- Kotlin ([coroutines](https://github.com/Kotlin/kotlinx.coroutines), [serialization](https://github.com/Kotlin/kotlinx.serialization), [dokka](https://github.com/Kotlin/dokka))\n- [ktor](https://github.com/ktorio/ktor) client\n- [gradle-maven-publish-plugin](https://github.com/vanniktech/gradle-maven-publish-plugin)\n- [OkHttp](https://github.com/square/okhttp)\n- [Stately](https://github.com/touchlab/Stately)\n- SwiftUI for the iOS app in the multiplatform example\n\n## License\nSee the [License](https://github.com/vksdk/vk-sdk-kotlin/blob/master/LICENSE)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvksdk%2Fvk-sdk-kotlin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvksdk%2Fvk-sdk-kotlin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvksdk%2Fvk-sdk-kotlin/lists"}