Setting up self-hosted environment for client testing #2957
-
Hi! I am developing a FHIR client library and I wanted to test the client with multiple servers, including Medplum. I have a docker setup to spin up the different servers and get rid of them after testing. However, I am struggling to integrate medplum into the setup: Also is there even access to FHIR resources without creating a project first? In that case I would need a script to set up the server with a project, a client and their association. After that I could use the token endpoint to get an access token and begin using the FHIR API. For creating the project I need to authenticate too though. So I ended up in circles, how do I get access to a FHIR API to test the easiest? :D Thank you in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @FlixCoder Note: The easiest way to get started would be to simply run the Medplum app. But this is an interesting question, so here is the long answer! It is possible to do everything via API. There are a couple of hurdles. The main challenge is that Medplum email/password auth requires PKCE, so we will need to send a couple non-obvious parameters. To get an access token via email/password entirely by API: 1. POST to
|
Beta Was this translation helpful? Give feedback.
Hi @FlixCoder
Note: The easiest way to get started would be to simply run the Medplum app. But this is an interesting question, so here is the long answer!
It is possible to do everything via API. There are a couple of hurdles. The main challenge is that Medplum email/password auth requires PKCE, so we will need to send a couple non-obvious parameters.
To get an access token via email/password entirely by API:
1. POST to
/auth/login
to get an authorization code:The…