Workflow or API calls:
Background Information:
We are trying to migrate our DSTU2
app to R4
. We are getting this error
_content' => '{"error":"invalid_grant","error_uri":"https://authorization.cerner.com/errors/urn%3Acerner%3Aerror%3Aauthorization-server%3Aoauth2%3Atoken%3Acode-invalid-or-expired/instances/4d332dd6-5616-4f38-9590-b938d3936008?client=46673d6d-09bb-45be-808b-753c203db0f9&tenant=ec2458f2-1e24-41c8-b71b-0e701af7583d"}'
while trying to get a token from
https://authorization.cerner.com/tenants/ec2458f2-1e24-41c8-b71b-0e701af7583d/hosts/fhir-ehr-code.cerner.com/protocols/oauth2/profiles/smart-v1/token
Here is supporting information:
'app_id' => '47948414-5b86-430c-9a6b-eb2d9b2cfbeb'
'aud' => 'https://fhir-ehr-code.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d'
'client_id' => '46673d6d-09bb-45be-808b-753c203db0f9'
'token_url' => 'https://authorization.cerner.com/tenants/ec2458f2-1e24-41c8-b71b-0e701af7583d/hosts/fhir-ehr-code.cerner.com/protocols/oauth2/profiles/smart-v1/token'
'grant_type' => 'authorization_code'
'scope' => 'patient/Patient.read launch online_access openid profile'
Expected Result:
Correct token.
Actual Result:
{"error":"invalid_grant","error_uri":"https://authorization.cerner.com/errors/urn%3Acerner%3Aerror%3Aauthorization-server%3Aoauth2%3Atoken%3Acode-invalid-or-expired/instances/4d332dd6-5616-4f38-9590-b938d3936008?client=46673d6d-09bb-45be-808b-753c203db0f9&tenant=ec2458f2-1e24-41c8-b71b-0e701af7583d"}
UTC => 2025-06-13 20:42:33:6818