Rotate the OSP
POST
/auth/rotate
const url = 'https://localhost:3000/api/v1/auth/rotate';const options = {method: 'POST', headers: {Authorization: '<Authorization>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://localhost:3000/api/v1/auth/rotate \ --header 'Authorization: <Authorization>'Generates a new OSP and revokes all refresh tokens. The old OSP can no longer log in; access tokens already issued stay valid until they expire (15 minutes max).
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”New OSP generated
Media typeapplication/json
object
message
required
string
osp
required
string
Example
{ "message": "OSP rotated successfully. Refresh tokens revoked, old OSP no longer valid. Access tokens already issued stay valid until they expire (15 minutes max).", "osp": "9x8y7z6w5v4u3t2s"}Unauthorized
Media typeapplication/json
object
error
required
string
message
string
Example
{ "error": "invalid_request", "message": "Invalid request body"}Erreur interne
Media typeapplication/json
object
error
required
string
message
string
Example
{ "error": "invalid_request", "message": "Invalid request body"}