Verify an email login code
curl --request POST \
--url https://api.pid.peridotvault.com/v1/auth/email/verify \
--header 'Content-Type: application/json' \
--data '
{
"email": "[email protected]",
"code": "428311",
"returnTo": "<string>",
"clientId": "<string>"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
email: '[email protected]',
code: '428311',
returnTo: '<string>',
clientId: '<string>'
})
};
fetch('https://api.pid.peridotvault.com/v1/auth/email/verify', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pid.peridotvault.com/v1/auth/email/verify"
payload = {
"email": "[email protected]",
"code": "428311",
"returnTo": "<string>",
"clientId": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.pid.peridotvault.com/v1/auth/email/verify"
payload := strings.NewReader("{\n \"email\": \"[email protected]\",\n \"code\": \"428311\",\n \"returnTo\": \"<string>\",\n \"clientId\": \"<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))
}{
"ok": true
}{
"statusCode": 400,
"message": [
"handle must be 3-20 chars: lowercase letters, numbers, underscore"
]
}{
"statusCode": 429,
"message": "ThrottlerException: Too Many Requests"
}auth
Verify an email login code
Consumes the 6-digit code (single-use, max 5 attempts, then locked).
Returning credentials get pid_access/pid_refresh cookies directly;
new addresses get { pendingClaim: true } plus the pid_claim cookie
for the PID picker. With returnTo (allowlisted, or registered to your
app via clientId), returning logins also receive a one-time
pidCode for SSO exchange.
POST
/
auth
/
email
/
verify
Verify an email login code
curl --request POST \
--url https://api.pid.peridotvault.com/v1/auth/email/verify \
--header 'Content-Type: application/json' \
--data '
{
"email": "[email protected]",
"code": "428311",
"returnTo": "<string>",
"clientId": "<string>"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
email: '[email protected]',
code: '428311',
returnTo: '<string>',
clientId: '<string>'
})
};
fetch('https://api.pid.peridotvault.com/v1/auth/email/verify', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pid.peridotvault.com/v1/auth/email/verify"
payload = {
"email": "[email protected]",
"code": "428311",
"returnTo": "<string>",
"clientId": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.pid.peridotvault.com/v1/auth/email/verify"
payload := strings.NewReader("{\n \"email\": \"[email protected]\",\n \"code\": \"428311\",\n \"returnTo\": \"<string>\",\n \"clientId\": \"<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))
}{
"ok": true
}{
"statusCode": 400,
"message": [
"handle must be 3-20 chars: lowercase letters, numbers, underscore"
]
}{
"statusCode": 429,
"message": "ThrottlerException: Too Many Requests"
}Body
application/json
Example:
Pattern:
^[0-9]{6}$Example:
"428311"
Cross-origin URL to bind a pid_code to
Registered app id (binds the pid_code to your app)