Getting Started for Server
Appwrite is a development platform providing you easy yet powerful API and management console to get your next project up and running quickly.
This tutorial will help you start using Appwrite products and build your next project. If you would like, you can download one of our quickstart samples to get started quickly.
Get Appwrite SDK for Your Platform
We provide libraries and SDKs for major programming languages and platforms so you don't have to write code for interacting with our HTTP APIs from scratch.
Choose your desired SDK corresponding to your product development platform and import it using the given package manager.
composer require 'appwrite/appwrite:1.0.0'
Create Your First Appwrite Project
Login to your Appwrite console or signup for a new account. Once inside your console click the icon in the top navigation header or on the 'Create Project' button. Choose a name for your app and click create to get started.
Grab an API Key
For you to init your SDK and interact with Appwrite services you need and API key. To get your first API key, go to your console, choose the project you created in the step before and click the 'API Keys' link.
Once inside your API keys screen click the 'Add API Key' button, choose your key name, for example: 'Demo Key' and select the scopes your key will be granted to use. To learn about the different API scopes available to you read more about Appwrite API Keys
Init your SDK
Initialize your SDK code with your project ID which can be found in your project settings page and your new API secret Key from previous phase.
$client = new \Appwrite\Client(); $client ->setEndpoint('https://appwrite.io/v1') // Set only when using self-hosted solution ->setProject('PROJECT_ID') ->setKey('API_KEY') ;
Make Your First Request
Once your SDK object is set, create any of the Appwrite service project 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 section.
$users = new \Appwrite\Services\Users($client); var_dump($users->get('USER_ID'));
$client = new \Appwrite\Client(); $client ->setEndpoint('https://appwrite.io/v1') // Set only when using self-hosted solution ->setProject('PROJECT_ID') ->setKey('API_KEY') ; $users = new \Appwrite\Services\Users($client); var_dump($users->get('USER_ID'));