Skip to content

Commit d32111d

Browse files
committed
chore: regen
1 parent 019bfe5 commit d32111d

File tree

13 files changed

+239
-45
lines changed

13 files changed

+239
-45
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Change Log
22

3+
## 17.2.1
4+
5+
* Deprecate `createVerification` method in `Account` service
6+
* Add `createEmailVerification` method in `Account` service
7+
38
## 15.1.0
49

510
* Add `incrementDocumentAttribute` and `decrementDocumentAttribute` support to `Databases` service

docs/account.md

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ A user is limited to 10 active sessions at a time by default. [Learn more about
580580

581581

582582
```http request
583-
POST https://cloud.appwrite.io/v1/account/verification
583+
POST https://cloud.appwrite.io/v1/account/verifications/email
584584
```
585585

586586
** 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](https://appwrite.io/docs/references/cloud/client-web/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.
@@ -596,7 +596,37 @@ Please note that in order to avoid a [Redirect Attack](https://github.com/OWASP/
596596

597597

598598
```http request
599-
PUT https://cloud.appwrite.io/v1/account/verification
599+
POST https://cloud.appwrite.io/v1/account/verifications/email
600+
```
601+
602+
** 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](https://appwrite.io/docs/references/cloud/client-web/account#updateVerification). The verification link sent to the user's email address is valid for 7 days.
603+
604+
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.
605+
**
606+
607+
### Parameters
608+
609+
| Field Name | Type | Description | Default |
610+
| --- | --- | --- | --- |
611+
| url | string | URL to redirect the user back to your app from the verification email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. | |
612+
613+
614+
```http request
615+
PUT https://cloud.appwrite.io/v1/account/verifications/email
616+
```
617+
618+
** Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code. **
619+
620+
### Parameters
621+
622+
| Field Name | Type | Description | Default |
623+
| --- | --- | --- | --- |
624+
| userId | string | User ID. | |
625+
| secret | string | Valid verification token. | |
626+
627+
628+
```http request
629+
PUT https://cloud.appwrite.io/v1/account/verifications/email
600630
```
601631

602632
** Use this endpoint to complete the user email verification process. Use both the **userId** and **secret** parameters that were attached to your app URL to verify the user email ownership. If confirmed this route will return a 200 status code. **
@@ -610,14 +640,14 @@ PUT https://cloud.appwrite.io/v1/account/verification
610640

611641

612642
```http request
613-
POST https://cloud.appwrite.io/v1/account/verification/phone
643+
POST https://cloud.appwrite.io/v1/account/verifications/phone
614644
```
615645

616646
** 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. **
617647

618648

619649
```http request
620-
PUT https://cloud.appwrite.io/v1/account/verification/phone
650+
PUT https://cloud.appwrite.io/v1/account/verifications/phone
621651
```
622652

623653
** 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. **
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
3+
use Appwrite\Client;
4+
use Appwrite\Services\Account;
5+
6+
$client = (new Client())
7+
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
8+
->setProject('<YOUR_PROJECT_ID>') // Your project ID
9+
->setSession(''); // The user session to authenticate with
10+
11+
$account = new Account($client);
12+
13+
$result = $account->createEmailVerification(
14+
url: 'https://example.com'
15+
);
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
use Appwrite\Client;
4+
use Appwrite\Services\Account;
5+
6+
$client = (new Client())
7+
->setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
8+
->setProject('<YOUR_PROJECT_ID>') // Your project ID
9+
->setSession(''); // The user session to authenticate with
10+
11+
$account = new Account($client);
12+
13+
$result = $account->updateEmailVerification(
14+
userId: '<USER_ID>',
15+
secret: '<SECRET>'
16+
);

docs/functions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ POST https://cloud.appwrite.io/v1/functions/{functionId}/deployments/template
186186

187187
** Create a deployment based on a template.
188188

189-
Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/server/functions#listTemplates) to find the template details. **
189+
Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/products/functions/templates) to find the template details. **
190190

191191
### Parameters
192192

docs/sites.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ POST https://cloud.appwrite.io/v1/sites/{siteId}/deployments/template
182182

183183
** Create a deployment based on a template.
184184

185-
Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/server/sites#listTemplates) to find the template details. **
185+
Use this endpoint with combination of [listTemplates](https://appwrite.io/docs/products/sites/templates) to find the template details. **
186186

187187
### Parameters
188188

0 commit comments

Comments
 (0)