Sends a verification email
curl --request POST \
--url https://api.example.com/v2/databases/{database}/auth/verify-email \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data email=user@example.com \
--data callbackUrl=https://example.com/callback \
--data 'csrfToken=<string>' \
--data redirectUrl=https://example.com/dashboardimport requests
url = "https://api.example.com/v2/databases/{database}/auth/verify-email"
payload = {
"email": "user@example.com",
"callbackUrl": "https://example.com/callback",
"csrfToken": "<string>",
"redirectUrl": "https://example.com/dashboard"
}
headers = {"Content-Type": "application/x-www-form-urlencoded"}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({
email: 'user@example.com',
callbackUrl: 'https://example.com/callback',
csrfToken: '<string>',
redirectUrl: 'https://example.com/dashboard'
})
};
fetch('https://api.example.com/v2/databases/{database}/auth/verify-email', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v2/databases/{database}/auth/verify-email",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "email=user%40example.com&callbackUrl=https%3A%2F%2Fexample.com%2Fcallback&csrfToken=%3Cstring%3E&redirectUrl=https%3A%2F%2Fexample.com%2Fdashboard",
CURLOPT_HTTPHEADER => [
"Content-Type: application/x-www-form-urlencoded"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v2/databases/{database}/auth/verify-email"
payload := strings.NewReader("email=user%40example.com&callbackUrl=https%3A%2F%2Fexample.com%2Fcallback&csrfToken=%3Cstring%3E&redirectUrl=https%3A%2F%2Fexample.com%2Fdashboard")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v2/databases/{database}/auth/verify-email")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("email=user%40example.com&callbackUrl=https%3A%2F%2Fexample.com%2Fcallback&csrfToken=%3Cstring%3E&redirectUrl=https%3A%2F%2Fexample.com%2Fdashboard")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v2/databases/{database}/auth/verify-email")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "email=user%40example.com&callbackUrl=https%3A%2F%2Fexample.com%2Fcallback&csrfToken=%3Cstring%3E&redirectUrl=https%3A%2F%2Fexample.com%2Fdashboard"
response = http.request(request)
puts response.read_body"<string>"This response has no body data."<string>"auth
Sends a verification email
POST
/
v2
/
databases
/
{database}
/
auth
/
verify-email
Sends a verification email
curl --request POST \
--url https://api.example.com/v2/databases/{database}/auth/verify-email \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data email=user@example.com \
--data callbackUrl=https://example.com/callback \
--data 'csrfToken=<string>' \
--data redirectUrl=https://example.com/dashboardimport requests
url = "https://api.example.com/v2/databases/{database}/auth/verify-email"
payload = {
"email": "user@example.com",
"callbackUrl": "https://example.com/callback",
"csrfToken": "<string>",
"redirectUrl": "https://example.com/dashboard"
}
headers = {"Content-Type": "application/x-www-form-urlencoded"}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({
email: 'user@example.com',
callbackUrl: 'https://example.com/callback',
csrfToken: '<string>',
redirectUrl: 'https://example.com/dashboard'
})
};
fetch('https://api.example.com/v2/databases/{database}/auth/verify-email', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v2/databases/{database}/auth/verify-email",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "email=user%40example.com&callbackUrl=https%3A%2F%2Fexample.com%2Fcallback&csrfToken=%3Cstring%3E&redirectUrl=https%3A%2F%2Fexample.com%2Fdashboard",
CURLOPT_HTTPHEADER => [
"Content-Type: application/x-www-form-urlencoded"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v2/databases/{database}/auth/verify-email"
payload := strings.NewReader("email=user%40example.com&callbackUrl=https%3A%2F%2Fexample.com%2Fcallback&csrfToken=%3Cstring%3E&redirectUrl=https%3A%2F%2Fexample.com%2Fdashboard")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v2/databases/{database}/auth/verify-email")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("email=user%40example.com&callbackUrl=https%3A%2F%2Fexample.com%2Fcallback&csrfToken=%3Cstring%3E&redirectUrl=https%3A%2F%2Fexample.com%2Fdashboard")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v2/databases/{database}/auth/verify-email")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "email=user%40example.com&callbackUrl=https%3A%2F%2Fexample.com%2Fcallback&csrfToken=%3Cstring%3E&redirectUrl=https%3A%2F%2Fexample.com%2Fdashboard"
response = http.request(request)
puts response.read_body"<string>"This response has no body data."<string>"Path Parameters
Body
application/x-www-form-urlencoded
Response
Token has been sent to the client via cookie, if possible
Was this page helpful?
⌘I