curl -X POST https://api.openloophealth.com/v0.1/auth/token \
-H "Content-Type: application/json" \
-d '{
"grant_type": "refresh_token",
"client_id": "<client_id>",
"client_secret": "<client_secret>",
"refresh_token": "<refresh_token>"
}'
{
"data": {
"access_token": "eyJhbGciOiJSUzI1NiIs...",
"token_type": "Bearer",
"expires_in": 900,
"refresh_token": "v1.NGQ4YTk1..."
},
"request_id": "1dc1fe12-f80f-408f-86a5-f5604d7568b1"
}
Auth
Refresh a token
Get new patient tokens from a refresh token, without re-authenticating.
POST
/
auth
/
token
curl -X POST https://api.openloophealth.com/v0.1/auth/token \
-H "Content-Type: application/json" \
-d '{
"grant_type": "refresh_token",
"client_id": "<client_id>",
"client_secret": "<client_secret>",
"refresh_token": "<refresh_token>"
}'
{
"data": {
"access_token": "eyJhbGciOiJSUzI1NiIs...",
"token_type": "Bearer",
"expires_in": 900,
"refresh_token": "v1.NGQ4YTk1..."
},
"request_id": "1dc1fe12-f80f-408f-86a5-f5604d7568b1"
}
Issues a new patient access token (and rotated refresh token) using the
refresh_token grant, without requiring the patient to log in again.
See “Keeping the session alive” in the User Registration guide.
Permissions: None
Refresh token from a previous Exchange a verification code or refresh call.
curl -X POST https://api.openloophealth.com/v0.1/auth/token \
-H "Content-Type: application/json" \
-d '{
"grant_type": "refresh_token",
"client_id": "<client_id>",
"client_secret": "<client_secret>",
"refresh_token": "<refresh_token>"
}'
{
"data": {
"access_token": "eyJhbGciOiJSUzI1NiIs...",
"token_type": "Bearer",
"expires_in": 900,
"refresh_token": "v1.NGQ4YTk1..."
},
"request_id": "1dc1fe12-f80f-408f-86a5-f5604d7568b1"
}
Body
application/json
Fields required depend on grant_type: client_credentials also requires audience; the verification-code grant also requires code; refresh_token also requires refresh_token.

