Skip to content

Commit 81e83b7

Browse files
feat: introduce 0.15.x support
1 parent 00a81dd commit 81e83b7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+1401
-715
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Appwrite PHP SDK
22

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

9-
**This SDK is compatible with Appwrite server version 0.14.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-php/releases).**
9+
**This SDK is compatible with Appwrite server version 0.15.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-php/releases).**
1010

1111
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)
1212

docs/account.md

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,21 @@ PATCH https://HOSTNAME/v1/account/password
6969
| password | string | New user password. Must be at least 8 chars. | |
7070
| oldPassword | string | Current user password. Must be at least 8 chars. | |
7171

72+
## Update Account Phone
73+
74+
```http request
75+
PATCH https://HOSTNAME/v1/account/phone
76+
```
77+
78+
** Update currently logged in user account phone number. After changing phone number, the user confirmation status will get reset. A new confirmation SMS is not sent automatically however you can use the phone confirmation endpoint again to send the confirmation SMS. **
79+
80+
### Parameters
81+
82+
| Field Name | Type | Description | Default |
83+
| --- | --- | --- | --- |
84+
| number | string | Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212. | |
85+
| password | string | User password. Must be at least 8 chars. | |
86+
7287
## Get Account Preferences
7388

7489
```http request
@@ -198,7 +213,7 @@ PATCH https://HOSTNAME/v1/account/status
198213
POST https://HOSTNAME/v1/account/verification
199214
```
200215

201-
** Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](/docs/client/account#accountUpdateVerification). The verification link sent to the user's email address is valid for 7 days.
216+
** Use this endpoint to send a verification message to your user email address to confirm they are the valid owners of that address. Both the **userId** and **secret** arguments will be passed as query parameters to the URL you have provided to be attached to the verification email. The provided URL should redirect the user back to your app and allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](/docs/client/account#accountUpdateEmailVerification). The verification link sent to the user's email address is valid for 7 days.
202217

203218
Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md), the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.
204219
**
@@ -224,3 +239,26 @@ PUT https://HOSTNAME/v1/account/verification
224239
| userId | string | User ID. | |
225240
| secret | string | Valid verification token. | |
226241

242+
## Create Phone Verification
243+
244+
```http request
245+
POST https://HOSTNAME/v1/account/verification/phone
246+
```
247+
248+
** Use this endpoint to send a verification message to your user's phone number to confirm they are the valid owners of that address. The provided secret should allow you to complete the verification process by verifying both the **userId** and **secret** parameters. Learn more about how to [complete the verification process](/docs/client/account#accountUpdatePhoneVerification). The verification link sent to the user's phone number is valid for 15 minutes. **
249+
250+
## Create Phone Verification (confirmation)
251+
252+
```http request
253+
PUT https://HOSTNAME/v1/account/verification/phone
254+
```
255+
256+
** Use this endpoint to complete the user phone verification process. Use the **userId** and **secret** that were sent to your user's phone number to verify the user email ownership. If confirmed this route will return a 200 status code. **
257+
258+
### Parameters
259+
260+
| Field Name | Type | Description | Default |
261+
| --- | --- | --- | --- |
262+
| userId | string | User ID. | |
263+
| secret | string | Valid verification token. | |
264+

0 commit comments

Comments
 (0)