Authenticating

How to authenticate with the Healthily API

You must authenticate your account using your Healthily API token and API key to obtain an Access Token.

This initial authentication only gives you access to the legal endpoints. After accepting the legal disclaimers a new, upgraded token will be issued which must be used for all the other endpoints.

POST https://portal.your.md/api/v1/login

Headers

NameDescription
Content-Typeapplication/json
x-api-keyYour Healthily API key

Body

Request body schema: application/json

NameDescription
partner_id (required)A unique identifier for you, generated at registration.
secret (required)Your password, generated at registration

Example request:

curl -X POST https://portal.your.md/api/v1/login \
     -H "x-api-key: GrNh3vPVdckgA9mCHxdmaSM2ucaywMZ9HbRJ1qTa"\
     -H "Content-Type: application/json"\
     -d '
     {
      "partner_id": "jZtrRBkCGWDgTWZKPqrE7CM6U8oGCJbt",
      "secret": "imPG3xd94D18xLksG80LRFpLKERDpfdt"
     }'

Response

Response schema: application/json

NameDescription
access_tokenJWT access token that must be used for all requests to the our endpoints (see below).
token_typeType of the token issued. Always returns bearer.
expires_inExpiry time of the access token in seconds.

Example response:

{
    "access_token": "eyJraWQiOiIzMmJiOTM5ZS1iYWYwLTRjY2ItYTZiOC04OTVkNDQ0MjAyNjMiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJNeUhlYWx0aCIsInBpZCI6ImpadHJSQmtDR1dEZ1RXWktQcXJFN0NNNlU4b0dDSmJ0IiwibGFuZ3VhZ2UiOiJlbi1VUyIsInZlcnNpb24iOiJWNSIsInNpZCI6ImNkYWFhZTdiLTYyNmEtNDliNy05MGY1LTUwOTM2MzEwZGNlNyIsImlzcyI6InltZC1pbnRlcm5hbC1zZXJ2aWNlIiwianRpIjoiNzdiMzViMTctYWM4OC00N2E5LWI5ZjMtNjBhOWViMjNjMDY2IiwiaWF0IjoxNzYxODM3MTA1LCJleHAiOjE3NjE4Mzg5NjV9.aQ_92asD3-1MjzDwgaLu6Ory0MkB0YJyRh2nHwj3EgNQ_NsbBVyNUUWQqPxf4IrV-xedjgJZGPLCt5PjhRiRh67j3e6CH5R0Ae4G1t3WmAFjIfqs9gFNOpJoGqxQv5WJteW2lEL2VqbrZzSB7QV4Hv0NbqYGvS5q7kbAWw1YhrWpnzhwauB_Pe-EUWAl9ZW7LciFKmitBwfQR3nbTn052QU08AvmmQDUuHERbyT2tWxsIrgjgMvnu3ywxseUHFYQ8J4-Xm-Je6c37ytzznVe96qIhd1KUbjy3jHjAuRRBSnA2Aa0Ukgwe62g9SQFzE9Tl7KE_l1uL9VeXUdK-PgsUw",
    "token_type": "bearer",
    "expires_in": 1860
}
📘

Make sure you keep a record of the sid JWT claim. It is the only session identifier provided.