The Medplum API uses standard OAuth2/OpenID authentication. "Client Credentials Flow" is recommended for machine-to-machine access.
This tutorial assumes you already have a Medplum account in good standing. (If not, please register.)
For this example you will need to provide an
Secret, but Redirect Uri is optional.
Connecting to the service
Execute a HTTP POST request to the OAuth2 Token endpoint:
curl -X POST https://api.medplum.com/oauth2/token \
-H "Content-Type: application/x-www-form-urlencoded" \
On success, the response will be a JSON object with the following properties:
The value of "access_token" can then be used in future requests for authentication.
For more details about OAuth2 Client Credentials Flow: