• Stars
    star
    140
  • Rank 261,473 (Top 6 %)
  • Language
    PHP
  • License
    BSD 3-Clause "New...
  • Created over 5 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

[READ-ONLY] Official Appwrite PHP SDK ๐Ÿ˜

Appwrite PHP SDK

License Version Build Status Twitter Account Discord

This SDK is compatible with Appwrite server version 1.3.x. For older versions, please check previous releases.

Appwrite 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 PHP 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

Appwrite

Installation

To install via Composer:

composer require appwrite/appwrite

Getting Started

Init your SDK

Initialize 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 from project's API keys section.

$client = new Client();

$client
    ->setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
    ->setProject('5df5acd0d48c2') // Your project ID
    ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
    ->setSelfSigned() // Use only on dev mode with a self-signed SSL cert
;

Make Your First Request

Once 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 section.

$users = new Users($client);

$user = $users->create(ID::unique(), '[email protected]', 'password');

Full Example

use Appwrite\Client;
use Appwrite\ID;
use Appwrite\Services\Users;

$client = new Client();

$client
    ->setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint
    ->setProject('5df5acd0d48c2') // Your project ID
    ->setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
    ->setSelfSigned() // Use only on dev mode with a self-signed SSL cert
;

$users = new Users($client);

$user = $users->create(ID::unique(), '[email protected]', 'password');

Error Handling

The Appwrite PHP 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.

$users = new Users($client);
try {
    $user = $users->create(ID::unique(), '[email protected]', 'password');
} catch(AppwriteException $error) {
    echo $error->message;
}

Learn more

You can use the following resources to learn more and get help

Contribution

This library is auto-generated by Appwrite custom SDK Generator. To learn more about how you can help us improve this SDK, please check the contribution guide before sending a pull-request.

License

Please see the BSD-3-Clause license file for more information.

More Repositories

1

appwrite

Your backend, minus the hassle.
TypeScript
43,403
star
2

sdk-for-react-native

[READ ONLY] Official Appwrite React Native SDK ๐Ÿ’™ โš›๏ธŽ
TypeScript
2,942
star
3

awesome-appwrite

Carefully curated list of awesome Appwrite resources ๐Ÿ’ช
954
star
4

pink

Pink. Appwrite's official framework agnostic design system ๐ŸŽจ ๐Ÿฉท
HTML
442
star
5

sdk-for-flutter

[READ-ONLY] Official Appwrite Flutter SDK ๐Ÿ’™
Dart
364
star
6

console

The Console that makes Appwrite tick from the browser ๐Ÿ–ฅ
Svelte
319
star
7

sdk-for-web

[READ-ONLY] Official Appwrite Web SDK ๐Ÿงก
TypeScript
281
star
8

sdk-generator

Generating SDKs for multiple programming languages and platforms โš™๏ธ
Twig
272
star
9

sdk-for-python

[READ-ONLY] Official Appwrite Python SDK ๐Ÿ
Python
221
star
10

sdk-for-node

[READ-ONLY] Official Appwrite Node.js SDK ๐ŸŸข
TypeScript
205
star
11

demo-todo-with-react

A basic demo example for integrating between Appwrite & React JS ๐Ÿ’™
JavaScript
201
star
12

website

The Appwrite website, docs and blog ๐Ÿ 
Svelte
188
star
13

demos-for-functions

Demo for Appwrite cloud functions in multiple coding languages โšก๏ธ ๐ŸŒฉ
Kotlin
121
star
14

playground-for-flutter

Simple examples that help you get started with Appwrite + Flutter (=โค๏ธ)
C++
121
star
15

templates

Templates for Appwrite Functions โšก๏ธ๐ŸŒฉ๏ธ
JavaScript
117
star
16

demo-todo-with-vue

A basic demo example for integrating between Appwrite & Vue JS ๐Ÿ’š
Vue
116
star
17

sdk-for-dart

[READ-ONLY] Official Appwrite Dart SDK ๐Ÿ’™
Dart
112
star
18

sdk-for-android

[READ-ONLY] Official Appwrite Android SDK ๐Ÿ’š ๐Ÿค–
Kotlin
108
star
19

demo-todo-with-svelte

A basic demo example for integrating between Appwrite & Svelte๐Ÿงก
Svelte
107
star
20

playground-for-web

Simple examples that help you get started with Appwrite + Web (=โค๏ธ)
HTML
99
star
21

sdk-for-apple

[READ-ONLY] Official Appwrite SDK for Apple Devices ๐ŸŽ
Swift
99
star
22

sdk-for-dotnet

[READ-ONLY] Official Appwrite .NET SDK
C#
94
star
23

sdk-for-cli

[READ-ONLY] Official Appwrite CLI >_
JavaScript
89
star
24

demos-for-react

Demos and tutorials for getting started with Appwrite + React JS
JavaScript
89
star
25

docs

The official https://appwrite.io/docs documentation ๐Ÿ“
HTML
84
star
26

sdk-for-kotlin

[READ-ONLY] Official Appwrite Kotlin SDK ๐Ÿ’™๐Ÿงก
Kotlin
77
star
27

dynamic-links

Implement Dynamic Links with Appwrite Functions!
HTML
75
star
28

sdk-for-svelte

Appwrite SDK for Svelte ๐Ÿงก โš ๏ธ Warning - this SDK was designed to support Appwrite 0.9 and is not compatible with the latest Appwrite versions. We are planing to refactor it as part of the SDK Generator for better support and maintenance.
Svelte
74
star
29

demo-almost-netflix-for-flutter

A Netflix clone built with @appwrite + @flutter
Dart
73
star
30

sdk-for-deno

[READ-ONLY] Official Appwrite Deno SDK ๐Ÿฆ•
TypeScript
71
star
31

demo-todo-with-angular

A basic demo example for integrating between Appwrite & Angular โค๏ธ
TypeScript
67
star
32

playground-for-android

Simple examples that help you get started with Appwrite + Android (=โค๏ธ)
Kotlin
66
star
33

sdk-for-go

[READ-ONLY] Official Appwrite GO SDK
Go
65
star
34

lite

A single container version of Appwrite with minimum must have features โš–๏ธ
Shell
65
star
35

php-clamav

ClamAV network and pipe client for PHP
PHP
63
star
36

playground-for-node

Simple examples that help you get started with Appwrite + Node.js (=โค๏ธ)
JavaScript
63
star
37

playground-for-python

Simple examples that help you get started with Appwrite + Python (=โค๏ธ)
Python
62
star
38

realtime-1-million

Learn how we built and tested our realtime server to 1M+ concurrent connections
Shell
59
star
39

sdk-for-ruby

[READ-ONLY] Official Appwrite Ruby SDK ๐Ÿ’Ž ๐Ÿ”ด
Ruby
58
star
40

demo-todo-with-nextjs

A basic demo example for integrating between Appwrite & Next.js ๐Ÿ’™
TypeScript
55
star
41

rfc

Architectural and new features proposals and designs for Appwrite ๐Ÿ“–
54
star
42

docker-clamav

ClamAV docker image with auto database updates
Shell
50
star
43

docker-smtp

SMTP server docker container for sending emails.
Dockerfile
48
star
44

assistant

Appwrite's AI assistant ๐Ÿง 
JavaScript
48
star
45

sdk-for-swift

[READ-ONLY] Official Appwrite Swift SDK ๐Ÿฆ…๐ŸŽ
Swift
47
star
46

demos-for-vue

Demos and tutorials for getting started with Appwrite + Vue.js
Vue
44
star
47

runtimes

Appwrite configuration for Cloud Function runtimes settings ๐ŸŒฉ
PHP
42
star
48

30daysofappwrite

Landing Page for 30 Days of Appwrite
Vue
41
star
49

techscrunch

Very relAIble open source alternative for TechCrunch
Svelte
40
star
50

builtwith

Explore popular projects built with Appwrite ๐Ÿ”
TypeScript
40
star
51

demo-quiz-with-flutter

A basic demo example for integrating between Appwrite & Flutter ๐Ÿ’™
Dart
40
star
52

playground-for-dart

Simple examples that help you get started with Appwrite + Dart (=โค๏ธ) as an Appwrite server-side integration.
Dart
40
star
53

integration-for-gitpod

Shell
39
star
54

hacktoberfest

๐Ÿก Home to Appwrite's Hacktoberfest Landing Page
Svelte
39
star
55

playground-for-apple-swiftui

Simple examples that help you get started with Appwrite + Apple with SwiftUI (=โค๏ธ)
Swift
39
star
56

demo-todo-with-flutter

A basic demo example for integrating between Appwrite & Flutter ๐Ÿ’™
Dart
38
star
57

docker-mariadb

MariaDB container with Appwrite server DB schema and tables initialized and ready to use for fresh installations.
Dockerfile
37
star
58

docker-resque-ui

Docker container for Resque web UI
Dockerfile
36
star
59

demos-for-svelte

Demos and tutorials for getting started with Appwrite + Svelte
JavaScript
36
star
60

playground-for-php

Simple examples that help you get started with Appwrite + PHP (=โค๏ธ)
PHP
35
star
61

docker-flutter

Flutter docker image for Appwrite CI
Dockerfile
33
star
62

install

CLI tool for easy installation of a self-hosted Appwrite server
PHP
32
star
63

docker-telegraf

Telegraf Docker image, pre-configured for Appwrite server setup.
Dockerfile
31
star
64

demos-for-astro

Astro
31
star
65

playground-for-deno

Simple examples that help you get started with Appwrite + Deno (=โค๏ธ)
TypeScript
30
star
66

functions-starter

Java
30
star
67

demo-job-portal-with-apple

A basic demo example for integrating between Appwrite & Apple (=โค๏ธ)
Swift
29
star
68

playground-for-dotnet

Simple examples that help you get started with Appwrite + .NET (=โค๏ธ)
C#
29
star
69

demo-almost-netflix-for-web

A Netflix clone built with @appwrite + @vuejs + @nuxt
Vue
29
star
70

playground-for-swift

Simple examples that help you get started with Appwrite + Swift for Server (=โค๏ธ)
Swift
29
star
71

demos-for-angular

Demos and tutorials for getting started with Appwrite + Angular JS
TypeScript
29
star
72

playground-for-ruby

Simple examples that help you get started with Appwrite + Ruby (=โค๏ธ)
Ruby
27
star
73

playground-for-apple-uikit

Simple examples that help you get started with Appwrite + iOS with UIKit (=โค๏ธ)
Swift
27
star
74

docker-influxdb

InfluxDB Docker image, pre-configured for Appwrite server setup.
Shell
26
star
75

playground-for-kotlin

Simple examples that help you get started with Appwrite + Kotlin (=โค๏ธ)
Kotlin
25
star
76

demo-watertracker-with-flutter

Dart
25
star
77

docker-altair

GraphQL client explorer packaged as a docker container ๐Ÿ•ธ
JavaScript
24
star
78

docker-mailcatcher

MailCatcher for catching mail content during development
Dockerfile
22
star
79

sdk-for-rust

[READ-ONLY] Official Appwrite Rust SDK โš™๏ธ
22
star
80

setup-for-appwrite

22
star
81

docker-requestcatcher

RequestCatcher for catching requests response during development
Dockerfile
22
star
82

integration-for-digitalocean

Appwrite integration for DigitalOcean 1-Click Marketplace
Shell
21
star
83

demo-quiz-with-android

Kotlin
20
star
84

benchmarks

The Appwrite laboratory for benchmarks and experiments ๐Ÿงช ๐Ÿ‘ฉโ€๐Ÿ”ฌ ๐Ÿฅฝ
20
star
85

docker-base

Appwrite base image
Dockerfile
18
star
86

demo-almost-netflix-for-android

Kotlin
17
star
87

docker-swagger

Swagger UI Docker image, pre-configured for Appwrite server setup
16
star
88

.github

16
star
89

demo-getstarted-with-android

Kotlin
15
star
90

sdk-for-console

TypeScript
15
star
91

demo-almost-netflix-for-apple

Swift
14
star
92

playground-for-react-native

Simple examples that help you get started with Appwrite + React Native (=โค๏ธ)
JavaScript
12
star
93

sdk-for-node-cli

JavaScript
11
star
94

snapwrite

A tool to convert code snippets into beautiful Appwrite-themed social-media images
Svelte
9
star
95

makers

Makers of Appwrite
Svelte
7
star
96

playground-for-rust

6
star
97

starter-for-vue

Appwrite's starter kit for Vue.js ๐Ÿ‘ฉโ€๐Ÿ’ป
4
star
98

getting-started-projects

TypeScript
4
star
99

demos-for-apple

Demos and tutorials for getting started with Appwrite + Apple
Swift
4
star
100

incidents

Details of incidents that occurred in Appwrite Cloud
4
star