Skip to main content

core.medplumclient.exchangeexternalaccesstoken

Home > @medplum/core > MedplumClient > exchangeExternalAccessToken

MedplumClient.exchangeExternalAccessToken() method

Exchange an external access token for a Medplum access token.

Signature:

exchangeExternalAccessToken(token: string, clientId?: string): Promise<ProfileResource>;

Parameters

ParameterTypeDescription
tokenstringThe access token that was generated by the external identity provider.
clientIdstring(Optional) The ID of the ClientApplication in your Medplum project that will be making the exchange request.

Returns:

Promise<ProfileResource>

The user profile resource.