{"id":13534145,"url":"https://github.com/appwrite/sdk-for-kotlin","last_synced_at":"2025-04-05T20:07:17.947Z","repository":{"id":44779304,"uuid":"378069941","full_name":"appwrite/sdk-for-kotlin","owner":"appwrite","description":"[READ-ONLY] Official Appwrite Kotlin SDK 💙🧡","archived":false,"fork":false,"pushed_at":"2025-01-29T13:22:12.000Z","size":911,"stargazers_count":80,"open_issues_count":0,"forks_count":13,"subscribers_count":14,"default_branch":"main","last_synced_at":"2025-03-29T19:05:46.524Z","etag":null,"topics":["appwrite","baas","firebase","hacktoberfest","java","kotlin"],"latest_commit_sha":null,"homepage":"https://appwrite.io","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/appwrite.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-18T07:29:37.000Z","updated_at":"2025-01-29T09:24:59.000Z","dependencies_parsed_at":"2024-02-27T09:41:47.763Z","dependency_job_id":"98c69ee4-3a1e-4f7f-85bf-2b3f892e536e","html_url":"https://github.com/appwrite/sdk-for-kotlin","commit_stats":{"total_commits":92,"total_committers":8,"mean_commits":11.5,"dds":0.5760869565217391,"last_synced_commit":"96006028bbb48016a08a30be277e4bfb7864338a"},"previous_names":[],"tags_count":34,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appwrite%2Fsdk-for-kotlin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appwrite%2Fsdk-for-kotlin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appwrite%2Fsdk-for-kotlin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appwrite%2Fsdk-for-kotlin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/appwrite","download_url":"https://codeload.github.com/appwrite/sdk-for-kotlin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247393569,"owners_count":20931812,"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","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":["appwrite","baas","firebase","hacktoberfest","java","kotlin"],"created_at":"2024-08-01T07:01:26.953Z","updated_at":"2025-04-05T20:07:17.924Z","avatar_url":"https://github.com/appwrite.png","language":"Kotlin","funding_links":[],"categories":["SDK"],"sub_categories":["Official Appwrite SDKs"],"readme":"# Appwrite Kotlin SDK\n\n![Maven Central](https://img.shields.io/maven-central/v/io.appwrite/sdk-for-kotlin.svg?color=green\u0026style=flat-square)\n![License](https://img.shields.io/github/license/appwrite/sdk-for-kotlin.svg?style=flat-square)\n![Version](https://img.shields.io/badge/api%20version-1.6.1-blue.svg?style=flat-square)\n[![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee\u0026label=twitter\u0026style=flat-square)](https://twitter.com/appwrite)\n[![Discord](https://img.shields.io/discord/564160730845151244?label=discord\u0026style=flat-square)](https://appwrite.io/discord)\n\n**This SDK is compatible with Appwrite server version 1.6.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-kotlin/releases).**\n\n \u003e This is the Kotlin SDK for integrating with Appwrite from your Kotlin server-side code. If you're looking for the Android SDK you should check [appwrite/sdk-for-android](https://github.com/appwrite/sdk-for-android)\n\nAppwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. Use the Kotlin SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)\n\n![Appwrite](https://github.com/appwrite/appwrite/raw/main/public/images/github.png)\n\n## Installation\n\n### Gradle\n\nAppwrite's Kotlin SDK is hosted on Maven Central. In order to fetch the Appwrite SDK, add this to your root level `build.gradle(.kts)` file:\n\n```groovy\nrepositories {      \n    mavenCentral()\n}\n```\n\nIf you would like to fetch our SNAPSHOT releases, you need to add the SNAPSHOT maven repository to your `build.gradle(.kts)`:\n\n```groovy\nrepositories {\n    maven {\n        url \"https://s01.oss.sonatype.org/content/repositories/snapshots/\"\n    }\n}\n```\n\nNext, add the dependency to your project's `build.gradle(.kts)` file:\n\n```groovy\nimplementation(\"io.appwrite:sdk-for-kotlin:7.0.0\")\n```\n\n### Maven\nAdd this to your project's `pom.xml` file:\n\n```xml\n\u003cdependencies\u003e\n    \u003cdependency\u003e\n        \u003cgroupId\u003eio.appwrite\u003c/groupId\u003e\n        \u003cartifactId\u003esdk-for-kotlin\u003c/artifactId\u003e\n        \u003cversion\u003e7.0.0\u003c/version\u003e\n    \u003c/dependency\u003e\n\u003c/dependencies\u003e\n```\n\n\n## Getting Started\n\n### Init your SDK\n\nInitialize your SDK with your Appwrite server API endpoint and project ID which can be found in your project settings page and your new API secret Key project API keys section.\n\n```kotlin\nimport io.appwrite.Client\nimport io.appwrite.services.Account\n\nsuspend fun main() {\n    val client = Client(context)\n      .setEndpoint(\"https://[HOSTNAME_OR_IP]/v1\") // Your API Endpoint\n      .setProject(\"5df5acd0d48c2\") // Your project ID\n      .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key\n      .setSelfSigned(true) // Use only on dev mode with a self-signed SSL cert\n}\n```\n\n### Make Your First Request\n\nOnce your SDK object is set, create any of the Appwrite service objects and choose any request to send. Full documentation for any service method you would like to use can be found in your SDK documentation or in the [API References](https://appwrite.io/docs) section.\n\n```kotlin\nval users = Users(client)\nval user = users.create(\n    user = ID.unique(),\n    email = \"email@example.com\",\n    phone = \"+123456789\",\n    password = \"password\",\n    name = \"Walter O'Brien\"\n)\n```\n\n### Full Example\n\n```kotlin\nimport io.appwrite.Client\nimport io.appwrite.services.Users\nimport io.appwrite.ID\n\nsuspend fun main() {\n    val client = Client(context)\n      .setEndpoint(\"https://[HOSTNAME_OR_IP]/v1\") // Your API Endpoint\n      .setProject(\"5df5acd0d48c2\") // Your project ID\n      .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key\n      .setSelfSigned(true) // Use only on dev mode with a self-signed SSL cert\n\n    val users = Users(client)\n    val user = users.create(\n        user = ID.unique(),\n        email = \"email@example.com\",\n        phone = \"+123456789\",\n        password = \"password\",\n        name = \"Walter O'Brien\"\n    )\n}\n```\n\n### Error Handling\n\nThe Appwrite Kotlin SDK raises `AppwriteException` object with `message`, `code` and `response` properties. You can handle any errors by catching `AppwriteException` and present the `message` to the user or handle it yourself based on the provided error information. Below is an example.\n\n```kotlin\nimport io.appwrite.Client\nimport io.appwrite.ID\nimport io.appwrite.services.Users\n\nsuspend fun main() {\n    val users = Users(client)\n    try {\n        val user = users.create(\n            user = ID.unique(),\n            email = \"email@example.com\",\n            phone = \"+123456789\",\n            password = \"password\",\n            name = \"Walter O'Brien\"\n        )\n    } catch (e: AppwriteException) {\n        e.printStackTrace()\n    }\n}\n```\n\n### Learn more\n\nYou can use the following resources to learn more and get help\n\n- 🚀 [Getting Started Tutorial](https://appwrite.io/docs/getting-started-for-server)\n- 📜 [Appwrite Docs](https://appwrite.io/docs)\n- 💬 [Discord Community](https://appwrite.io/discord)\n- 🚂 [Appwrite Kotlin Playground](https://github.com/appwrite/playground-for-kotlin)\n\n\n## Contribution\n\nThis library is auto-generated by Appwrite custom [SDK Generator](https://github.com/appwrite/sdk-generator). To learn more about how you can help us improve this SDK, please check the [contribution guide](https://github.com/appwrite/sdk-generator/blob/master/CONTRIBUTING.md) before sending a pull-request.\n\n## License\n\nPlease see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappwrite%2Fsdk-for-kotlin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fappwrite%2Fsdk-for-kotlin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappwrite%2Fsdk-for-kotlin/lists"}