Redeem an email verification token
curl --request POST \
--url https://app.trustivan.com/api/v1/auth/verify-email \
--header 'Content-Type: application/json' \
--data '
{
"token": "<string>"
}
'import requests
url = "https://app.trustivan.com/api/v1/auth/verify-email"
payload = { "token": "<string>" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({token: '<string>'})
};
fetch('https://app.trustivan.com/api/v1/auth/verify-email', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.trustivan.com/api/v1/auth/verify-email"
payload := strings.NewReader("{\n \"token\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}Redeem an email verification token
Marks an address verified. Public, because the person following a verification link may hold no session, and requiring one would make a link useless on any device that is not already signed in. The 256-bit token is the authority: it is stored only as a SHA-256 digest, expires after 24 hours, and is single-use.
Unknown, already-redeemed and expired tokens all answer the same 400. Telling them apart would tell a holder of a guessed token whether it ever existed.
Enforcement of verification at login is off unless the deployment sets
REQUIRE_EMAIL_VERIFICATION; see docs/architecture/13-configuration.md.
POST
/
auth
/
verify-email
Redeem an email verification token
curl --request POST \
--url https://app.trustivan.com/api/v1/auth/verify-email \
--header 'Content-Type: application/json' \
--data '
{
"token": "<string>"
}
'import requests
url = "https://app.trustivan.com/api/v1/auth/verify-email"
payload = { "token": "<string>" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({token: '<string>'})
};
fetch('https://app.trustivan.com/api/v1/auth/verify-email', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.trustivan.com/api/v1/auth/verify-email"
payload := strings.NewReader("{\n \"token\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}