Blue Button 2.0: API Connection

Tech: ruby, rails, dotenv, httparty, APIs!

Challenge: second task this week to connect & query an API. When it rains, it pours. This time… CMS Blue Button 2.0. More difficult than HSX, due to the callback.¬†

Code:

login redirect 

bb_login_redirect

 

and callback where the temp code is exchanged for an access token

bb_callback

 
Reference:
https://bluebutton.cms.gov/developers/