API referenceConsumerConsumer.device sessions
Refresh a device session in the current project
Exchanges a valid refresh token for a fresh device access token and refresh token pair, while ensuring the session still belongs to the selected project.
Header Parameters
X-Project-Id*string
UUID of the project that scopes consumer accounts, devices, sessions, and VSpaces for the request.
Format
uuidRequest Body
application/json
Refresh payload containing the device, session, and refresh token to rotate.
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/consumer/v1/auth/device/sessions/refresh" \ -H "X-Project-Id: 11111111-1111-1111-1111-111111111111" \ -H "Content-Type: application/json" \ -d '{ "device_id": "55555555-5555-5555-5555-555555555555", "refresh_token": "forestvpn-refresh-token-demo", "session_id": "66666666-6666-6666-6666-666666666666" }'{ "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.consumer-access.rotated-signature", "device_id": "55555555-5555-5555-5555-555555555555", "expires_in": 3600, "refresh_token": "forestvpn-refresh-token-rotated", "session_id": "66666666-6666-6666-6666-666666666666"}{ "detail": "Pool slug must be unique.", "instance": "urn:forestvpn:trace:a1b2c3d4", "title": "Validation Error", "type": "https://fvpn.net/errors/validation"}{ "detail": "Pool slug must be unique.", "instance": "urn:forestvpn:trace:a1b2c3d4", "title": "Validation Error", "type": "https://fvpn.net/errors/validation"}{ "detail": "Pool slug must be unique.", "instance": "urn:forestvpn:trace:a1b2c3d4", "title": "Validation Error", "type": "https://fvpn.net/errors/validation"}