Skip to content

Setting up self-hosted environment for client testing #2957

Answered by codyebberson
FlixCoder asked this question in Q&A
Discussion options

You must be logged in to vote

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:

curl 'http://localhost:8103/auth/login' \
  -X POST \
  -H 'Content-Type: application/json' \
  --data-raw '{"email":"admin@example.com","password":"medplum_admin","codeChallengeMethod":"plain","codeChallenge":"my_challenge"}'

The…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@FlixCoder
Comment options

@sirewix
Comment options

Answer selected by FlixCoder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants