Difference between revisions of "Blue Button"
From MgmtWiki
(Created page with "==Full Title== ==Explainer== ===Error Codes== Following is the curl call to refresh access token if it is expired. Thanks to Brady Fausett. # Token Refresh CURL Example:BB...") |
|||
Line 3: | Line 3: | ||
==Explainer== | ==Explainer== | ||
− | ===Error Codes== | + | ===Error Codes=== |
Following is the curl call to refresh access token if it is expired. Thanks to Brady Fausett. | Following is the curl call to refresh access token if it is expired. Thanks to Brady Fausett. | ||
Line 11: | Line 11: | ||
## -u "${BB_CLIENT_ID}:${BB_CLIENT_SECRET}" \ | ## -u "${BB_CLIENT_ID}:${BB_CLIENT_SECRET}" \ | ||
## -d "grant_type=refresh_token&client_id=${BB_CLIENT_ID}&refresh_token=${REFRESH_TOKEN}"EXAMPLE RETURN FROM CURL COMMAND: {"access_token": # "wlRtbVkXzUdE9Kcjc8wWnpRmJ7KuuC", "expires_in": 36000, "token_type": "Bearer", "scope": "patient/ExplanationOfBenefit.read patient/Coverage.read", "refresh_token": "gzKxj0JkKamuaOWZRaIAJyfL3e9CZW", "patient": "-19990000000003"}200 | ## -d "grant_type=refresh_token&client_id=${BB_CLIENT_ID}&refresh_token=${REFRESH_TOKEN}"EXAMPLE RETURN FROM CURL COMMAND: {"access_token": # "wlRtbVkXzUdE9Kcjc8wWnpRmJ7KuuC", "expires_in": 36000, "token_type": "Bearer", "scope": "patient/ExplanationOfBenefit.read patient/Coverage.read", "refresh_token": "gzKxj0JkKamuaOWZRaIAJyfL3e9CZW", "patient": "-19990000000003"}200 | ||
+ | |||
+ | ==References== | ||
+ | |||
+ | [[Category: Health]] |
Revision as of 07:52, 2 November 2021
Full Title
Explainer
Error Codes
Following is the curl call to refresh access token if it is expired. Thanks to Brady Fausett.
- Token Refresh CURL Example:BB_SERVER="<BB2 sandbox or prod URL>"
- BB_CLIENT_ID="<your app's client ID>"
- BB_CLIENT_SECRET="<your app's client SECRET>"REFRESH_TOKEN="<your refresh token associated with a previously granted access token>"curl -s -w # # "% {http_code}" -X POST "${BB_SERVER}/v1/o/token/" \
- -u "${BB_CLIENT_ID}:${BB_CLIENT_SECRET}" \
- -d "grant_type=refresh_token&client_id=${BB_CLIENT_ID}&refresh_token=${REFRESH_TOKEN}"EXAMPLE RETURN FROM CURL COMMAND: {"access_token": # "wlRtbVkXzUdE9Kcjc8wWnpRmJ7KuuC", "expires_in": 36000, "token_type": "Bearer", "scope": "patient/ExplanationOfBenefit.read patient/Coverage.read", "refresh_token": "gzKxj0JkKamuaOWZRaIAJyfL3e9CZW", "patient": "-19990000000003"}200