# Getting Error While Calling the Authorization Code Grant

**URL:** <https://community.open-emr.org/t/getting-error-while-calling-the-authorization-code-grant/16300>\
**Category:** OpenEMR Development\
**Created:** [March 19, 2021, 8:56am UTC](https://community.open-emr.org/t/getting-error-while-calling-the-authorization-code-grant/16300 "2021-03-19T08:56:59Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![mohit](https://community.open-emr.org/letter_avatar_proxy/v4/letter/m/c68b51/32.png) [@mohit](https://community.open-emr.org/u/mohit)\
**Post date:** [June 23, 2021, 2:38pm UTC](https://community.open-emr.org/t/getting-error-while-calling-the-authorization-code-grant/16300/13 "2021-06-23T14:38:33Z")

</div>

Hi,  
I am facing the issue while registering the client through oauth.  
I am using latest git code [GitHub - openemr/openemr: OpenEMR is the most popular open source electronic health records and medical practice management solution. OpenEMR's goal is a superior alternative to its proprietary counterparts.](https://github.com/openemr/openemr)

I am using CURl below  
curl --location --request POST ‘[https://localhost/openemrv2/oauth2/default/registration](https://localhost/openemrv2/oauth2/default/registration)’ \

–header ‘Content-Type: application/json’ \

–data-raw '{

```
"application_type": "private",

"redirect_uris": [

    "https://openemr.localhost/openemr"

],

"post_logout_redirect_uris": [

    "https://openemr.localhost/openemr/logout"

],

"client_name": "adminlocalusemohit",

"token_endpoint_auth_method": "client_secret_post",

"username": "adminlocalusemohit",

"scope": "openid api:oemr api:fhir api:port api:pofh user/allergy.read user/allergy.write user/appointment.read user/appointment.write user/dental_issue.read user/dental_issue.write user/document.read user/document.write user/drug.read user/encounter.read user/encounter.write user/facility.read user/facility.write user/immunization.read user/insurance.read user/insurance.write user/insurance_company.read user/insurance_company.write user/insurance_type.read user/list.read user/medical_problem.read user/medical_problem.write user/medication.read user/medication.write user/message.write user/patient.read user/patient.write user/practitioner.read user/practitioner.write user/prescription.read user/procedure.read user/soap_note.read user/soap_note.write user/surgery.read user/surgery.write user/vital.read user/vital.write user/AllergyIntolerance.read user/CareTeam.read user/Condition.read user/Encounter.read user/Immunization.read user/Location.read user/Medication.read user/MedicationRequest.read user/Observation.read user/Organization.read user/Organization.write user/Patient.read user/Patient.write user/Practitioner.read user/Practitioner.write user/PractitionerRole.read user/Procedure.read patient/encounter.read patient/patient.read patient/Encounter.read patient/Patient.read"

```

}’

I am getting the reponse:-  
{

```
"error": "server_error",

"error_description": "The authorization server encountered an unexpected condition which prevented it from fulfilling the request: Security error - problem with authorization server keys.",

"message": "The authorization server encountered an unexpected condition which prevented it from fulfilling the request: Security error - problem with authorization server keys."

```

}

**can someone help me to register my client**  
**Thanks**

---

_[View the full topic](https://community.open-emr.org/t/getting-error-while-calling-the-authorization-code-grant/16300)._
