Authentication
MD Live uses JWT Web Tokens to allow access to our API endpoints.
We grant two types of tokens. The type needed depends on the endpoints that you would like to access.
| Endpoints that: | Can use: |
|---|---|
| do not require a patient id | API token |
| require a patient id | User token |
MD Live expects for the token to be included in all API requests to the server in a header that looks like the following:
Authorization: Bearer {jwt_token}
Example Request
Section titled “Example Request”# With shell, you can just pass the correct header with each requestcurl "api_endpoint_here" -H "Authorization: Bearer {jwt_token}"# With ruby, you can can add correct header to the request objectRestClient::Request.new( :method => :get, :url => "sample_url", :headers => { 'Authorization' => 'Bearer {jwt_token}' }).executeMake sure to replace {jwt_token} with your JWT Token.