...
Once you have an authorization code, you can swap this for an access token ( and possibly usually a refresh token tootoken. The only exception is if the remaining expiry time of the access token exceeds the expiry time remaining of the session (this is rare).
POST https://sandbox.patientsknowbest.com/apiToken.action
...
PKB responds with the access token in JSON, and possibly usually a refresh token tootoken. The only exception is if the remaining expiry time of the access token exceeds the expiry time remaining of the session (this is rare).
Parameters
Parameter | Type | Optionality | Description | Example |
access_token | JSON parameter | Required | This is the access token that can subsequently be used to authenticate against the relevant API, and gain access to the functionality | 2YotnFZFEjr1zCsicMWpAA |
token_type | JSON parameter | Required | This is always "Bearer" | Bearer |
expires_in | JSON parameter | Required | This indicates the number of seconds for which the access_token is valid | 600 |
refresh_token | JSON parameter | Optional | If the session has not expired, a refresh_token will also be issued. This can be used to obtain a new access_token when the token validity period has expired. | tGzv3JOkF0XG5Qx2TlKWIA |
scope | JSON parameter | Optional | This will match the scope specified in step 1 | PATIENT |
...