Get an access token
POST/v1/auth/token
Generates an access token for API authentication. Specify desired scope in the request to determine available operations. Tokens for 'read:locations' don't expire, while 'read:bookings' and 'write:bookings' tokens expire after one hour. Multiple active tokens are allowed for different purposes
Request​
- application/json
Body
required
Required. Your unique client identifier provided by Solv Health.
Required. Your secret key provided by Solv Health. Keep this confidential.
Default value: service_api
Required. Must be set to 'service_api' for this endpoint.
Default value: read:locations
Required. Desired access scope. Options include 'read:locations', 'read:bookings', 'write:bookings', etc. Multiple scopes can be requested by separating with commas. Affects token expiration. Tokens with 'read:locations' scope don't expire, while those with 'read:bookings' or 'write:bookings' expire after one hour.
Responses​
- 200
- 422
Successful Response
- application/json
- Schema
- Example (from schema)
Schema
The access token to be used in subsequent API calls.
Only sent to booking scoped tokens
Only sent to booking scoped tokens
Only sent to booking scoped tokens
The type of token, typically 'bearer'.
{
"access_token": "string",
"expiration_timestamp": "2024-07-29T15:51:28.071Z",
"expires_in": 0,
"grant_type": "string",
"refresh_token": "string",
"token_type": "string"
}
Validation Error
- application/json
- Schema
- Example (from schema)
Schema
Array [
Array [
- MOD1
- MOD2
]
]
detail
object[]
loc
object[]
required
anyOf
string
integer
{
"detail": [
{
"loc": [
"string",
0
],
"msg": "string",
"type": "string"
}
]
}