Skip to content

1.6.x #34

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Appwrite PHP SDK

![License](https://img.shields.io/github/license/appwrite/sdk-for-php.svg?style=flat-square&v=1)
![Version](https://img.shields.io/badge/api%20version-1.5.7-blue.svg?style=flat-square&v=1)
![Version](https://img.shields.io/badge/api%20version-1.6.0-blue.svg?style=flat-square&v=1)
[![Build Status](https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square)](https://travis-ci.com/appwrite/sdk-generator)
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite)
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord)

**This SDK is compatible with Appwrite server version 1.5.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-php/releases).**
**This SDK is compatible with Appwrite server version 1.6.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-php/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](https://appwrite.io/docs)

Expand Down
11 changes: 5 additions & 6 deletions docs/account.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ DELETE https://cloud.appwrite.io/v1/account/identities/{identityId}
## Create JWT

```http request
POST https://cloud.appwrite.io/v1/account/jwt
POST https://cloud.appwrite.io/v1/account/jwts
```

** Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame. **
Expand Down Expand Up @@ -106,7 +106,7 @@ PATCH https://cloud.appwrite.io/v1/account/mfa
| --- | --- | --- | --- |
| mfa | boolean | Enable or disable MFA. | |

## Add Authenticator
## Create Authenticator

```http request
POST https://cloud.appwrite.io/v1/account/mfa/authenticators/{type}
Expand All @@ -126,7 +126,7 @@ POST https://cloud.appwrite.io/v1/account/mfa/authenticators/{type}
PUT https://cloud.appwrite.io/v1/account/mfa/authenticators/{type}
```

** Verify an authenticator app after adding it using the [add authenticator](/docs/references/cloud/client-web/account#createMfaAuthenticator) method. add **
** Verify an authenticator app after adding it using the [add authenticator](/docs/references/cloud/client-web/account#createMfaAuthenticator) method. **

### Parameters

Expand All @@ -148,9 +148,8 @@ DELETE https://cloud.appwrite.io/v1/account/mfa/authenticators/{type}
| Field Name | Type | Description | Default |
| --- | --- | --- | --- |
| type | string | **Required** Type of authenticator. | |
| otp | string | Valid verification token. | |

## Create 2FA Challenge
## Create MFA Challenge

```http request
POST https://cloud.appwrite.io/v1/account/mfa/challenge
Expand Down Expand Up @@ -562,7 +561,7 @@ POST https://cloud.appwrite.io/v1/account/verification/phone

** Use this endpoint to send a verification SMS to the currently logged in user. This endpoint is meant for use after updating a user's phone number using the [accountUpdatePhone](https://appwrite.io/docs/references/cloud/client-web/account#updatePhone) endpoint. Learn more about how to [complete the verification process](https://appwrite.io/docs/references/cloud/client-web/account#updatePhoneVerification). The verification code sent to the user's phone number is valid for 15 minutes. **

## Create phone verification (confirmation)
## Update phone verification (confirmation)

```http request
PUT https://cloud.appwrite.io/v1/account/verification/phone
Expand Down
6 changes: 4 additions & 2 deletions docs/avatars.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ GET https://cloud.appwrite.io/v1/avatars/favicon
```

** Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.
**

This endpoint does not follow HTTP redirects. **

### Parameters

Expand Down Expand Up @@ -83,7 +84,8 @@ GET https://cloud.appwrite.io/v1/avatars/image
** Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.

When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.
**

This endpoint does not follow HTTP redirects. **

### Parameters

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/create-anonymous-session.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use Appwrite\Services\Account;

$client = (new Client())
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
->setProject('5df5acd0d48c2'); // Your project ID
->setProject('<YOUR_PROJECT_ID>'); // Your project ID

$account = new Account($client);

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/create-email-password-session.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use Appwrite\Services\Account;

$client = (new Client())
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
->setProject('5df5acd0d48c2'); // Your project ID
->setProject('<YOUR_PROJECT_ID>'); // Your project ID

$account = new Account($client);

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/create-email-token.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use Appwrite\Services\Account;

$client = (new Client())
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
->setProject('5df5acd0d48c2'); // Your project ID
->setProject('<YOUR_PROJECT_ID>'); // Your project ID

$account = new Account($client);

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/create-j-w-t.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use Appwrite\Services\Account;

$client = (new Client())
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
->setProject('5df5acd0d48c2'); // Your project ID
->setProject('<YOUR_PROJECT_ID>'); // Your project ID

$account = new Account($client);

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/create-magic-u-r-l-token.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use Appwrite\Services\Account;

$client = (new Client())
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
->setProject('5df5acd0d48c2'); // Your project ID
->setProject('<YOUR_PROJECT_ID>'); // Your project ID

$account = new Account($client);

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/create-mfa-authenticator.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use Appwrite\Enums\AuthenticatorType;

$client = (new Client())
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
->setProject('5df5acd0d48c2') // Your project ID
->setProject('<YOUR_PROJECT_ID>') // Your project ID
->setSession(''); // The user session to authenticate with

$account = new Account($client);
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/create-mfa-challenge.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use Appwrite\Enums\AuthenticationFactor;

$client = (new Client())
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
->setProject('5df5acd0d48c2'); // Your project ID
->setProject('<YOUR_PROJECT_ID>'); // Your project ID

$account = new Account($client);

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/create-mfa-recovery-codes.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use Appwrite\Services\Account;

$client = (new Client())
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
->setProject('5df5acd0d48c2') // Your project ID
->setProject('<YOUR_PROJECT_ID>') // Your project ID
->setSession(''); // The user session to authenticate with

$account = new Account($client);
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/create-o-auth2token.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use Appwrite\Enums\OAuthProvider;

$client = (new Client())
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
->setProject('5df5acd0d48c2'); // Your project ID
->setProject('<YOUR_PROJECT_ID>'); // Your project ID

$account = new Account($client);

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/create-phone-token.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use Appwrite\Services\Account;

$client = (new Client())
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
->setProject('5df5acd0d48c2'); // Your project ID
->setProject('<YOUR_PROJECT_ID>'); // Your project ID

$account = new Account($client);

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/create-phone-verification.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use Appwrite\Services\Account;

$client = (new Client())
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
->setProject('5df5acd0d48c2') // Your project ID
->setProject('<YOUR_PROJECT_ID>') // Your project ID
->setSession(''); // The user session to authenticate with

$account = new Account($client);
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/create-recovery.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use Appwrite\Services\Account;

$client = (new Client())
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
->setProject('5df5acd0d48c2') // Your project ID
->setProject('<YOUR_PROJECT_ID>') // Your project ID
->setSession(''); // The user session to authenticate with

$account = new Account($client);
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/create-session.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use Appwrite\Services\Account;

$client = (new Client())
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
->setProject('5df5acd0d48c2'); // Your project ID
->setProject('<YOUR_PROJECT_ID>'); // Your project ID

$account = new Account($client);

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/create-verification.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use Appwrite\Services\Account;

$client = (new Client())
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
->setProject('5df5acd0d48c2') // Your project ID
->setProject('<YOUR_PROJECT_ID>') // Your project ID
->setSession(''); // The user session to authenticate with

$account = new Account($client);
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use Appwrite\Services\Account;

$client = (new Client())
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
->setProject('5df5acd0d48c2'); // Your project ID
->setProject('<YOUR_PROJECT_ID>'); // Your project ID

$account = new Account($client);

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/delete-identity.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use Appwrite\Services\Account;

$client = (new Client())
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
->setProject('5df5acd0d48c2') // Your project ID
->setProject('<YOUR_PROJECT_ID>') // Your project ID
->setSession(''); // The user session to authenticate with

$account = new Account($client);
Expand Down
5 changes: 2 additions & 3 deletions docs/examples/account/delete-mfa-authenticator.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@ use Appwrite\Enums\AuthenticatorType;

$client = (new Client())
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
->setProject('5df5acd0d48c2') // Your project ID
->setProject('<YOUR_PROJECT_ID>') // Your project ID
->setSession(''); // The user session to authenticate with

$account = new Account($client);

$result = $account->deleteMfaAuthenticator(
type: AuthenticatorType::TOTP(),
otp: '<OTP>'
type: AuthenticatorType::TOTP()
);
2 changes: 1 addition & 1 deletion docs/examples/account/delete-session.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use Appwrite\Services\Account;

$client = (new Client())
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
->setProject('5df5acd0d48c2') // Your project ID
->setProject('<YOUR_PROJECT_ID>') // Your project ID
->setSession(''); // The user session to authenticate with

$account = new Account($client);
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/delete-sessions.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use Appwrite\Services\Account;

$client = (new Client())
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
->setProject('5df5acd0d48c2') // Your project ID
->setProject('<YOUR_PROJECT_ID>') // Your project ID
->setSession(''); // The user session to authenticate with

$account = new Account($client);
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/get-mfa-recovery-codes.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use Appwrite\Services\Account;

$client = (new Client())
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
->setProject('5df5acd0d48c2') // Your project ID
->setProject('<YOUR_PROJECT_ID>') // Your project ID
->setSession(''); // The user session to authenticate with

$account = new Account($client);
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/get-prefs.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use Appwrite\Services\Account;

$client = (new Client())
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
->setProject('5df5acd0d48c2') // Your project ID
->setProject('<YOUR_PROJECT_ID>') // Your project ID
->setSession(''); // The user session to authenticate with

$account = new Account($client);
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/get-session.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use Appwrite\Services\Account;

$client = (new Client())
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
->setProject('5df5acd0d48c2') // Your project ID
->setProject('<YOUR_PROJECT_ID>') // Your project ID
->setSession(''); // The user session to authenticate with

$account = new Account($client);
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/get.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use Appwrite\Services\Account;

$client = (new Client())
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
->setProject('5df5acd0d48c2') // Your project ID
->setProject('<YOUR_PROJECT_ID>') // Your project ID
->setSession(''); // The user session to authenticate with

$account = new Account($client);
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/list-identities.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use Appwrite\Services\Account;

$client = (new Client())
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
->setProject('5df5acd0d48c2') // Your project ID
->setProject('<YOUR_PROJECT_ID>') // Your project ID
->setSession(''); // The user session to authenticate with

$account = new Account($client);
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/list-logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use Appwrite\Services\Account;

$client = (new Client())
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
->setProject('5df5acd0d48c2') // Your project ID
->setProject('<YOUR_PROJECT_ID>') // Your project ID
->setSession(''); // The user session to authenticate with

$account = new Account($client);
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/list-mfa-factors.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use Appwrite\Services\Account;

$client = (new Client())
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
->setProject('5df5acd0d48c2') // Your project ID
->setProject('<YOUR_PROJECT_ID>') // Your project ID
->setSession(''); // The user session to authenticate with

$account = new Account($client);
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/list-sessions.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use Appwrite\Services\Account;

$client = (new Client())
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
->setProject('5df5acd0d48c2') // Your project ID
->setProject('<YOUR_PROJECT_ID>') // Your project ID
->setSession(''); // The user session to authenticate with

$account = new Account($client);
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/update-email.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use Appwrite\Services\Account;

$client = (new Client())
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
->setProject('5df5acd0d48c2') // Your project ID
->setProject('<YOUR_PROJECT_ID>') // Your project ID
->setSession(''); // The user session to authenticate with

$account = new Account($client);
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/update-m-f-a.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use Appwrite\Services\Account;

$client = (new Client())
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
->setProject('5df5acd0d48c2') // Your project ID
->setProject('<YOUR_PROJECT_ID>') // Your project ID
->setSession(''); // The user session to authenticate with

$account = new Account($client);
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/update-magic-u-r-l-session.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use Appwrite\Services\Account;

$client = (new Client())
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
->setProject('5df5acd0d48c2'); // Your project ID
->setProject('<YOUR_PROJECT_ID>'); // Your project ID

$account = new Account($client);

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/update-mfa-authenticator.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use Appwrite\Enums\AuthenticatorType;

$client = (new Client())
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
->setProject('5df5acd0d48c2') // Your project ID
->setProject('<YOUR_PROJECT_ID>') // Your project ID
->setSession(''); // The user session to authenticate with

$account = new Account($client);
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/update-mfa-challenge.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use Appwrite\Services\Account;

$client = (new Client())
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
->setProject('5df5acd0d48c2') // Your project ID
->setProject('<YOUR_PROJECT_ID>') // Your project ID
->setSession(''); // The user session to authenticate with

$account = new Account($client);
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/update-mfa-recovery-codes.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use Appwrite\Services\Account;

$client = (new Client())
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
->setProject('5df5acd0d48c2') // Your project ID
->setProject('<YOUR_PROJECT_ID>') // Your project ID
->setSession(''); // The user session to authenticate with

$account = new Account($client);
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/account/update-name.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use Appwrite\Services\Account;

$client = (new Client())
->setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
->setProject('5df5acd0d48c2') // Your project ID
->setProject('<YOUR_PROJECT_ID>') // Your project ID
->setSession(''); // The user session to authenticate with

$account = new Account($client);
Expand Down
Loading