Just anyone faced the same issue with `/oauth2/tok...
# general
y
Just anyone faced the same issue with
/oauth2/token
endpoint? the request is POST /oauth2/token HTTP/1.1 Host: app.medplum.com Accept: application/json Authorization: Basic OTk= Content-Length: 122 Content-Type: application/x-www-form-urlencoded code=b14f427a1e6b9da383567ba3571d30e7&grant_type=authorization_code&redirect_uri=https%3A%2F%2Fpatient-ehr.domain.com And I am getting response not json but html page Medplum
r
I can point you to our docs page for the https://www.medplum.com/docs/api/oauth/token. I think the issue is that you're posting to
app.medplum.com
instead of
api.medplum.com
If you take a look at our Oauth2 demo, you can see that the baseUrl for all Oauth2 requests is api.medplum.com https://github.com/medplum/medplum-oauth-demo/blob/main/index.html#L18-L20
y
I updated app.medplum.com to api.medplum.com and getting this response ERROR: The request could not be satisfied 403 ERROR The request could not be satisfied. Bad request. We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner. If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation. Generated by cloudfront (CloudFront) Request ID: ZRM3IOmrteJ5kEKFbYYWACgVktgthTpA_FLvPYR12puzbksNgUO86A==
r
@yury.starav are you doing this via CURL?
3586 Views