Start Google login
curl --request POST \
--url https://api.pid.peridotvault.com/v1/auth/login \
--header 'Content-Type: application/json' \
--data '
{
"returnTo": "https://mygame.dev/callback",
"clientId": "pidapp_0123456789abcdef0123456789abcdef"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
returnTo: 'https://mygame.dev/callback',
clientId: 'pidapp_0123456789abcdef0123456789abcdef'
})
};
fetch('https://api.pid.peridotvault.com/v1/auth/login', 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/login"
payload = {
"returnTo": "https://mygame.dev/callback",
"clientId": "pidapp_0123456789abcdef0123456789abcdef"
}
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/login"
payload := strings.NewReader("{\n \"returnTo\": \"https://mygame.dev/callback\",\n \"clientId\": \"pidapp_0123456789abcdef0123456789abcdef\"\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))
}{
"url": "http://localhost:3300/v1/auth/google"
}{
"statusCode": 400,
"message": [
"handle must be 3-20 chars: lowercase letters, numbers, underscore"
]
}{
"statusCode": 429,
"message": "ThrottlerException: Too Many Requests"
}auth
Start Google login
Returns the URL a client should navigate to in order to begin Google OAuth.
The URL points to GET /auth/google, which redirects the browser to Google’s
consent screen. After the user consents, the browser is redirected back through
/auth/google/callback and session cookies are set.
For cross-origin SSO, pass returnTo (must be allowlisted, or registered to
your app via clientId) — the callback then redirects to
returnTo?pid_code=... with a one-time exchange code instead of the wallet.
First-time users always land on the PID picker after authenticating
(POST /v1/auth/claim creates the permanent <handle>@pid identity) —
handles are only ever chosen there, never up front. Returning logins
continue straight to a session.
POST
/
auth
/
login
Start Google login
curl --request POST \
--url https://api.pid.peridotvault.com/v1/auth/login \
--header 'Content-Type: application/json' \
--data '
{
"returnTo": "https://mygame.dev/callback",
"clientId": "pidapp_0123456789abcdef0123456789abcdef"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
returnTo: 'https://mygame.dev/callback',
clientId: 'pidapp_0123456789abcdef0123456789abcdef'
})
};
fetch('https://api.pid.peridotvault.com/v1/auth/login', 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/login"
payload = {
"returnTo": "https://mygame.dev/callback",
"clientId": "pidapp_0123456789abcdef0123456789abcdef"
}
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/login"
payload := strings.NewReader("{\n \"returnTo\": \"https://mygame.dev/callback\",\n \"clientId\": \"pidapp_0123456789abcdef0123456789abcdef\"\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))
}{
"url": "http://localhost:3300/v1/auth/google"
}{
"statusCode": 400,
"message": [
"handle must be 3-20 chars: lowercase letters, numbers, underscore"
]
}{
"statusCode": 429,
"message": "ThrottlerException: Too Many Requests"
}