Hello Team,
I’m currently working on the POC for backend services using the Cerner FHIR API. While trying to establish the OAuth token, I’m encountering an error and could use your help troubleshooting it.
I’ve created accounts in below environments:
- Cerner Sandbox Console (App name: Test)
- My testing Client id : d574c61f-66fb-453e-b37f-37084b41b501
I'm try the below Token End Points for tested:
https://authorization.cerner.com/tenants/ec2458f2-1e24-41c8-b71b-0e701af7583d/protocols/oauth2/profiles/smart-v1/token
https://authorization.cerner.com/tenants/ec2458f2-1e24-41c8-b71b-0e701af7583d/protocols/oauth2/profiles/smart-v2/token
https://authorization.cerner.com/tenants/ec2458f2-1e24-41c8-b71b-0e701af7583d/hosts/fhir-ehr.cerner.com/protocols/oauth2/profiles/smart-v1/token
https://authorization.cerner.com/tenants/ec2458f2-1e24-41c8-b71b-0e701af7583d/hosts/fhir-ehr.cerner.com/protocols/oauth2/profiles/smart-v2/token
API Parameters,
grant_type: client_credentials
client_assertion_type:urn: ietf:params:oauth:client-assertion-type:jwt-bearer
client_assertion : “My JSON Web Token”
JWT Header,
{
"alg": "RS384",
"typ": "JWT",
"kid": "e31f259crulsnf686c"
}
JWT Payload,
{
"iss": "d2ab5fdb-f802-4996-ac56-b1d850f0d290",
"sub": "d2ab5fdb-f802-4996-ac56-b1d850f0d290",
"aud":[https://authorization.cerner.com/tenants/ec2458f2-1e24-41c8-b71b-0e701af7583d/protocols/oauth2/profiles/smart-v1/token](https://ind01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fauthorization.cerner.com%2Ftenants%2Fec2458f2-1e24-41c8-b71b-0e701af7583d%2Fprotocols%2Foauth2%2Fprofiles%2Fsmart-v1%2Ftoken&data=05%7C02%7CKarthikeyan.K%40Veehealthtek.com%7Cf2f3cc4f4c34413d2edd08de18620e9f%7Cb4e7e7b55a574b8eb453d0937d9fe57c%7C0%7C0%7C638975006629722128%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=i%2BVkQm%2Fi%2B%2BKatNaqTUACokAlIvYot1fvHrpNXpeVZ6I%3D&reserved=0),
"jti": "f9eaafba-2e49-11ea-8880-5ce0c5aee999",
"exp": 1761898274,
"iat": 1761898274
}
I'm getting the below error, pls any on help on this:
{
"error": "invalid_client",
"error_uri": "https://authorization.cerner.com/errors/urn%3Acerner%3Aerror%3Aauthorization-server%3Aoauth2%3Atoke…
}