curl --request POST \
--url https://app.trustivan.com/api/v1/auth/refresh \
--header 'Content-Type: application/json' \
--data '
{
"refresh_token": "<string>"
}
'import requests
url = "https://app.trustivan.com/api/v1/auth/refresh"
payload = { "refresh_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({refresh_token: '<string>'})
};
fetch('https://app.trustivan.com/api/v1/auth/refresh', 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/refresh"
payload := strings.NewReader("{\n \"refresh_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))
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}Renew a browser session
The token is read from the refresh cookie when there is one, so a browser client sends no body. A client holding the token directly sends it in the body instead.
A refresh token is single-use: the rotation claims it atomically, so of several requests presenting one token at once exactly one succeeds, and a token presented again after rotation revokes every refresh token the user holds.
When the user’s verified domain enforces SSO, only sessions that came
through the identity provider renew, plus the break-glass: the password
session of an owner of the enforcing organization who still has a
confirmed second factor. Any other session is refused with 401 and
"sso_required": true, and the client should send the user to SSO
sign-in.
When an organization the user belongs to requires MFA and the user has
no second factor, a non-SSO session is refused with 401 and
"mfa_enrollment_required": true; the next login enrols them.
curl --request POST \
--url https://app.trustivan.com/api/v1/auth/refresh \
--header 'Content-Type: application/json' \
--data '
{
"refresh_token": "<string>"
}
'import requests
url = "https://app.trustivan.com/api/v1/auth/refresh"
payload = { "refresh_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({refresh_token: '<string>'})
};
fetch('https://app.trustivan.com/api/v1/auth/refresh', 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/refresh"
payload := strings.NewReader("{\n \"refresh_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))
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}