Create email verification
Endpoint
posthttps://<REGION>.cloud.appwrite.io/v1/account/verification
Description
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. The verification link sent to the user's email address is valid for 7 days.
Please note that in order to avoid a Redirect Attack, the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.
Required scopes
Authentication
setProject() and a signed-in user (setSession() or setJWT()). For direct REST calls, send X-Appwrite-Project with session/JWT headers.Rate limit
Parameters
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 attack against your project API.
Token
Token ID.
Token creation date in ISO 8601 format.
User ID.
Token secret key. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.
Token expiration date in ISO 8601 format.
require 'appwrite'
include Appwrite
client = Client.new .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint .set_project('5df5acd0d48c2') # Your project ID .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
account = Account.new(client)
response = account.create_verification(url: 'https://example.com')
puts response.inspectAccount
Create email verification
Endpoint
posthttps://<REGION>.cloud.appwrite.io/v1/account/verification
Description
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. The verification link sent to the user's email address is valid for 7 days.
Please note that in order to avoid a Redirect Attack, the only valid redirect URLs are the ones from domains you have set when adding your platforms in the console interface.
Required scopes
Authentication
setProject() and a signed-in user (setSession() or setJWT()). For direct REST calls, send X-Appwrite-Project with session/JWT headers.Rate limit
Parameters
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 attack against your project API.
Token
Token ID.
Token creation date in ISO 8601 format.
User ID.
Token secret key. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.
Token expiration date in ISO 8601 format.
require 'appwrite'
include Appwrite
client = Client.new .set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint .set_project('5df5acd0d48c2') # Your project ID .set_jwt('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ...') # Your secret JSON Web Token
account = Account.new(client)
response = account.create_verification(url: 'https://example.com')
puts response.inspect