I am using REST to create a user on the server side after receiving form data from the client. After the account is successfully created i wanted to send the verification email using REST also.
First I create the account like this:
``` const response = await fetch(${VITE_APPWRITE_ENDPOINT}/users
, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-Appwrite-Response-Format': '1.4.0',
'X-Appwrite-Project': VITE_APPWRITE_PROJECT_ID,
'X-Appwrite-Key': PRIVATE_API_KEY,
},
body: JSON.stringify(payload)
});
const json = await response.json();
The json will give me an object with the users account like $id and so on..
How can I use that with this?
```POST /v1/account/verification HTTP/1.1
Host: cloud.appwrite.io
Content-Type: application/json
X-Appwrite-Response-Format: 1.6.0
X-Appwrite-Project: <YOUR_PROJECT_ID>
X-Appwrite-Session:
X-Appwrite-JWT: <YOUR_JWT>
{
"url": "https://example.com"
}```
I don't see where i can pass the userID or email.
Thanks
Recommended threads
- Use different email hosts for different ...
Hello, I have 2 projects and i want to be able to set up email templates in the projects. Both projects will have different email host configurations. I see ...
- Get team fail in appwrite function
I try to get team of a user inside appwrite function, but i get this error: `AppwriteException: User (role: guests) missing scope (teams.read)` If i try on cl...
- Deploy function not working - 503
Hellon i get this error message, when i try to deploy a new version of a function <html><body><h1>503 Service Unavailable</h1>No server is available to handle...