Mail a verification link to the caller's address
curl --request POST \
--url https://app.trustivan.com/api/v1/me/verify-email \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.trustivan.com/api/v1/me/verify-email"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.trustivan.com/api/v1/me/verify-email', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.trustivan.com/api/v1/me/verify-email"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"status": "sent",
"expires_in_seconds": 123,
"verification_token": "<string>"
}Mail a verification link to the caller's address
Mails a link to <DASHBOARD_URL>/auth/verify-email?token=… for the
CALLER’s own address; the dashboard page redeems it with
POST /auth/verify-email. A new link invalidates the previous one, and
at most one is sent a minute. Signup mails one automatically, and with
REQUIRE_EMAIL_VERIFICATION a login refused for an unverified address
(401, code: email_not_verified) mails a fresh one.
The token is never returned outside development: a token handed to the caller who asked for it proves nothing about the address. In development it is also returned, so the flow works without a mailbox. Refused for a machine principal, which has no address.
POST
/
me
/
verify-email
Mail a verification link to the caller's address
curl --request POST \
--url https://app.trustivan.com/api/v1/me/verify-email \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.trustivan.com/api/v1/me/verify-email"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.trustivan.com/api/v1/me/verify-email', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.trustivan.com/api/v1/me/verify-email"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"status": "sent",
"expires_in_seconds": 123,
"verification_token": "<string>"
}