Rotate the refresh token
curl --request POST \
--url https://api.pid.peridotvault.com/v1/auth/refreshconst options = {method: 'POST'};
fetch('https://api.pid.peridotvault.com/v1/auth/refresh', 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/refresh"
response = requests.post(url)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.pid.peridotvault.com/v1/auth/refresh"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"statusCode": 401,
"message": "Unauthorized"
}{
"statusCode": 429,
"message": "ThrottlerException: Too Many Requests"
}auth
Rotate the refresh token
Rotates the refresh token and issues a fresh access token. The current pid_refresh
cookie is invalidated and replaced with a new one (rotation), so each refresh token
can be used exactly once.
- 401 if the refresh token is missing, expired, already rotated, or forged.
- Rate limited to 10 requests / minute.
POST
/
auth
/
refresh
Rotate the refresh token
curl --request POST \
--url https://api.pid.peridotvault.com/v1/auth/refreshconst options = {method: 'POST'};
fetch('https://api.pid.peridotvault.com/v1/auth/refresh', 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/refresh"
response = requests.post(url)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.pid.peridotvault.com/v1/auth/refresh"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"statusCode": 401,
"message": "Unauthorized"
}{
"statusCode": 429,
"message": "ThrottlerException: Too Many Requests"
}Response
New access + refresh cookies set; old refresh token revoked