Token Refresh
When an access token expires, use this endpoint to obtain a fresh one without requiring the user to log in again.
Endpoint
Section titled “Endpoint”POST
/user/v1/refreshtokenRequest Body
Section titled “Request Body”curl -X POST https://api.juspredict.com/user/v1/refreshtoken \-H 'Authorization: Bearer YOUR_TOKEN' \-H 'Content-Type: application/json' \-d '{"refresh_token": "YOUR_REFRESH_TOKEN"}'{"refresh_token": "YOUR_REFRESH_TOKEN"}Constraints
Section titled “Constraints”| Field | Requirement |
|---|---|
refresh_token | Required. Must be at least 10 characters long. |
Response Body
Section titled “Response Body”{"status": {"type": "SUCCESS","details": []},"access_token": "NEW_ACCESS_TOKEN","refresh_token": "NEW_REFRESH_TOKEN","token_expiry": "2026-04-18T13:00:00Z","refresh_token_expiry": "2026-05-18T12:00:00Z"}{"status": {"type": "ERROR","details": [ { "code": "401", "message": "Unauthorized access token." }]}}Response Fields
Section titled “Response Fields”| Field | Type | Description |
|---|---|---|
status | Status | Operation status. |