Authentication
Refresh Token
Refresh the access token using the refresh token cookie.
POST /api/auth/refresh
Refresh the access token using the refresh token stored in an HTTP-only cookie. The client does not need to send any body — the refresh token is read from the cookie.
Auth: Public (uses JwtRefreshGuard to validate the refresh cookie)
Example
curl -X POST https://api.reten.ai/api/auth/refresh \
-b "refreshToken=eyJhbGciOiJIUzI1NiIs..."import axios from 'axios';
const response = await axios.post(
'https://api.reten.ai/api/auth/refresh',
{},
{ withCredentials: true }
);
const { accessToken } = response.data;Response 200 OK
{
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}A new refresh token cookie is also set.
Error Responses
| Status | Description |
|---|---|
401 | Invalid or expired refresh token |