My local hospital uses Epic's MyChart, which should implement the standard FHIR API. How can I authenticate and access my data through a script? There are a million websites like https://onerecord.com/ that let you log into basically any patient portal by searching for the name of your hospital and giving you a little pop up to login through. How do I actually implement something like this?
I found tutorials on using the FHIR API but I can't find any explanation of how these health data aggregation websites like OneRecord find and authenticate with different hospital's FHIR API endpoints.
The HL7 FHIR docs will give you the overall standard but not necessarily the details on an EHR-specific implementation. For Epic, you can use their Epic on FHIR site to review API specs, get a walkthrough of the authentication flow, and register an app to play with or publish.
Other Certified Health IT products have similar documentation, which you can look up using CHPL.