Refresh a token
POST/jwt/refresh
Access tokens are intentionally short-lived (because they cannot be revoked). As a result, the user's front-end should call this endpoint to get a new pair of session tokens (access and refresh).
Request
- application/json
Body
required
refresh_token stringrequired
Responses
- 200
Tokens.
- application/json
- Schema
- Example (from schema)
Schema
access_token jwt_tokenrequired
A (typically) short-lived JWT token used to access authenticated resources, e.g the Nabla Patient API.
refresh_token jwt_tokenrequired
A (typically) long-lived JWT token allowing you to "refresh" your access to resources (i.e. extend your session, returning a fresh access token and a new refresh token with a later expiration).
{
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0eXBlIjoiYWNjZXNzIiwic3ViIjoiMTIzNDU2Nzg5MCIsIm5hbWUiOiJKb2huIERvZSIsImlhdCI6MTUxNjIzOTAyMn0.v5qdy8w9Ygs5fdic9a1LuX76PUdx3omYd5GlDTAF3Ug",
"refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0eXBlIjoiYWNjZXNzIiwic3ViIjoiMTIzNDU2Nzg5MCIsIm5hbWUiOiJKb2huIERvZSIsImlhdCI6MTUxNjIzOTAyMn0.v5qdy8w9Ygs5fdic9a1LuX76PUdx3omYd5GlDTAF3Ug"
}
Loading...