Skip to main content

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​

Body

required

    client_id Client ID (string)required

    Required. Your unique client identifier provided by Solv Health.

    client_secret Client Secret (string)required

    Required. Your secret key provided by Solv Health. Keep this confidential.

    grant_type Grant Type (string)required

    Default value: service_api

    Required. Must be set to 'service_api' for this endpoint.

    scope Scope (string)required

    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​

Successful Response

Schema

    access_token Access Token (string)required

    The access token to be used in subsequent API calls.

    expiration_timestamp date-time

    Only sent to booking scoped tokens

    expires_in Expires In (integer)

    Only sent to booking scoped tokens

    grant_type Grant Type (string)required
    refresh_token Refresh Token (string)

    Only sent to booking scoped tokens

    token_type Token Type (string)required

    The type of token, typically 'bearer'.

Loading...