curl -X POST https://api.openloophealth.com/v0.1/auth/token \
-H "Content-Type: application/json" \
-d '{
"grant_type": "client_credentials",
"client_id": "<client_id>",
"client_secret": "<client_secret>",
"audience": "https://api.openloophealth.com"
}'
{
"data": {
"access_token": "eyJhbGciOiJSUzI1NiIs...",
"token_type": "Bearer",
"expires_in": 300
},
"request_id": "1dc1fe12-f80f-408f-86a5-f5604d7568b1"
}
Auth
Obtain a service token
Get an M2M access token via the client_credentials grant.
POST
/
auth
/
token
curl -X POST https://api.openloophealth.com/v0.1/auth/token \
-H "Content-Type: application/json" \
-d '{
"grant_type": "client_credentials",
"client_id": "<client_id>",
"client_secret": "<client_secret>",
"audience": "https://api.openloophealth.com"
}'
{
"data": {
"access_token": "eyJhbGciOiJSUzI1NiIs...",
"token_type": "Bearer",
"expires_in": 300
},
"request_id": "1dc1fe12-f80f-408f-86a5-f5604d7568b1"
}
Issues a short-lived M2M access token using the
client_credentials grant. Use this token as the Bearer credential for Register a user, Send a one-time login/verification code, and Verify a one-time code.
This is the first call in the User Registration flow.
Permissions: None
API audience:
https://api-staging.openloophealth.com for staging, https://api.openloophealth.com for production.curl -X POST https://api.openloophealth.com/v0.1/auth/token \
-H "Content-Type: application/json" \
-d '{
"grant_type": "client_credentials",
"client_id": "<client_id>",
"client_secret": "<client_secret>",
"audience": "https://api.openloophealth.com"
}'
{
"data": {
"access_token": "eyJhbGciOiJSUzI1NiIs...",
"token_type": "Bearer",
"expires_in": 300
},
"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.

