Hello, I don't know when it started ``` curl --loc...
# general
y
Hello, I don't know when it started
Copy code
curl --location 'https://api.medplum.com/oauth2/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'client_assertion=here_my_jwt_value' \
--data-urlencode 'client_assertion_type=urn%3Aietf%3Aparams%3Aoauth%3Aclient-assertion-type%3Ajwt-bearer' \
--data-urlencode 'grant_type=client_credentials'
requires client_id and client_secret
Copy code
{
  "error": "invalid_request",
  "error_description": "Missing client_id"
}
however it should not
c
@yury.starav - it looks like you double-encoded the
client_assertion_type
parameter
client_id
is not required when using
client_assertion
i think the problem is that the
client_assertion_type
was unrecognized, and therefore ignored
I opened a PR to return a more accurate error message in that case: https://github.com/medplum/medplum/pull/1777
y
I tested the same request with EPIC and it returns access token
r
@yury.starav , are you seeing success with the following?
Copy code
curl --location 'https://api.medplum.com/oauth2/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'client_assertion=here_my_jwt_value' \
--data-urlencode 'client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer' \
--data-urlencode 'grant_type=client_credentials'
y
when I add client_id and client_secret
r
Do mind re-posting the latest failing query? Did it fail even after replacing "%3A" with ":"?
@yury.starav can you try replacing your "%3A" with ":" in your
client_assertion_type
?
y
now it works
178 Views