We are in the process of integrating our application, with Epic’s SMART on FHIR APIs using the EHR launch flow. During the access token exchange step, we are consistently receiving the following error: { "error": "invalid_grant", "error_description": null }
Details:
Client ID: CLIENT_ID
Redirect URI: REDIRECT_URI
Authorization Code Received: (Can provide one if needed)
Code Challenge Method: S256 (PKCE)
Code Verifier: Being sent and verified correctly
We have confirmed the following:
The authorization code is received via redirect correctly.
The code verifier matches the original value used to generate the code challenge.
The redirect URI used in the token request matches the one registered and used in the authorize request.
Client ID and other parameters are valid and properly encoded.
Despite this, the token exchange fails with the above error.