I’ve used on SMART on FHIR to successfully pull test patient data from Epic’s sandbox (it’s a standalone launch). I’m trying now to pull real patient data from a health system but I keep getting the error: “OAuth2 Error. Something went wrong trying to authorize the client. Please try logging in again.”
When I switched from sandbox to prod, I made the following changes in my code:
- Changed the endpoint for Epic’s endpoint (https://fhir.epic.com/interconnect-fhir-oauth/api/FHIR/R4/) to the health system’s endpoint (e.g. https://sfd.stanfordmed.org/FHIR/api/FHIR/R4/).
- Changed my client ID from Epic’s Non-Production Client ID to Epic’s Production Client ID
- Ensured that the app was marked ready for production
Is there anything else I should be doing when switching from sandbox to prod to make the authorization work properly? I’m not using refresh tokens at the moment. Thanks!