SMART Application Launch Framework Implementation Guide Release 1.0.0

This page is part of the Smart App Launch Implementation Guide (v1.0.0: STU 1) based on FHIR R3. The current version which supercedes this version is 2.0.0. For a full list of available versions, see the Directory of published versions

Example: Request Access Token

$ curl -i  'http://launch.smarthealthit.org/v/r2/sim/eyJoIjoiMSIsImoiOiIxIn0/auth/token' -H 'Content-Type: application/x-www-form-urlencoded' -H 'Accept: application/json' -H 'Authorization: Basic bXktYXBwOm15LWFwcC1zZWNyZXQtMTIz'  --data 'code=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJjb250ZXh0Ijp7Im5lZWRfcGF0aWVudF9iYW5uZXIiOnRydWUsInNtYXJ0X3N0eWxlX3VybCI6Imh0dHBzOi8vbGF1bmNoLnNtYXJ0aGVhbHRoaXQub3JnL3NtYXJ0LXN0eWxlLmpzb24iLCJwYXRpZW50IjoiZjNlY2Y2OTAtZTAzNS00OThkLTllOGMtMWVmMWU0ZGIzNGI3IiwiZW5jb3VudGVyIjoiNDYzMmU2MWItOWIzNC00YWQ3LWE0MzEtZjAwOGYzNWI0ZGQzIn0sImNsaWVudF9pZCI6Im15X3dlYl9hcHAiLCJzY29wZSI6Im9wZW5pZCBwcm9maWxlIG9mZmxpbmVfYWNjZXNzIHVzZXIvKi4qIHBhdGllbnQvKi4qIGxhdW5jaC9lbmNvdW50ZXIgbGF1bmNoL3BhdGllbnQiLCJ1c2VyIjoiUHJhY3RpdGlvbmVyL1NNQVJULTEyMzQiLCJpYXQiOjE1Mjk2NzM5MDIsImV4cCI6MTUyOTY3NDIwMn0.t6Yn9NwDYYNHyiNut67li8TD76Y_C-jq0VQ1MPELjWI&grant_type=authorization_code&redirect_uri=http%3A%2F%2Flaunch.smarthealthit.org%2Fsample-app%2F&client_id=my_web_app'
HTTP/1.1 200 OK
Server: Cowboy
Connection: keep-alive
X-Powered-By: Express
Vary: Origin
Access-Control-Allow-Credentials: true
Content-Type: application/json; charset=utf-8
Content-Length: 3990
Etag: W/"f96-2/KmEgiTG/y739fuYps3LNG/Bzk"
Date: Fri, 22 Jun 2018 13:27:17 GMT
Via: 1.1 vegur

{"need_patient_banner":true,"smart_style_url":"https://launch.smarthealthit.org/smart-style.json","patient":"f3ecf690-e035-498d-9e8c-1ef1e4db34b7","encounter":"4632e61b-9b34-4ad7-a431-f008f35b4dd3","refresh_token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJjb250ZXh0Ijp7Im5lZWRfcGF0aWVudF9iYW5uZXIiOnRydWUsInNtYXJ0X3N0eWxlX3VybCI6Imh0dHBzOi8vbGF1bmNoLnNtYXJ0aGVhbHRoaXQub3JnL3NtYXJ0LXN0eWxlLmpzb24iLCJwYXRpZW50IjoiZjNlY2Y2OTAtZTAzNS00OThkLTllOGMtMWVmMWU0ZGIzNGI3IiwiZW5jb3VudGVyIjoiNDYzMmU2MWItOWIzNC00YWQ3LWE0MzEtZjAwOGYzNWI0ZGQzIn0sImNsaWVudF9pZCI6Im15X3dlYl9hcHAiLCJzY29wZSI6Im9wZW5pZCBwcm9maWxlIG9mZmxpbmVfYWNjZXNzIHVzZXIvKi4qIHBhdGllbnQvKi4qIGxhdW5jaC9lbmNvdW50ZXIgbGF1bmNoL3BhdGllbnQiLCJ1c2VyIjoiUHJhY3RpdGlvbmVyL1NNQVJULTEyMzQiLCJpYXQiOjE1Mjk2NzM5MDIsImV4cCI6MTUyOTY3NDIwMn0.t6Yn9NwDYYNHyiNut67li8TD76Y_C-jq0VQ1MPELjWI","token_type":"bearer","scope":"openid profile offline_access user/*.* patient/*.* launch/encounter launch/patient","client_id":"my_web_app","expires_in":3600,"id_token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJwcm9maWxlIjoiUHJhY3RpdGlvbmVyL1NNQVJULTEyMzQiLCJhdWQiOiJteV93ZWJfYXBwIiwic3ViIjoiNzZkNTNmZjZjY2Q2OWVhMjdmMzIzOTM4MGIzMDM5YjRhODcyOTkyZjgxNTF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