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, membershipId?: string): Promise<ProfileResource>;

Parameters

Parameter

Type

Description

token

string

The access token that was generated by the external identity provider.

clientId

string

(Optional) The ID of the ClientApplication in your Medplum project that will be making the exchange request.

membershipId

string

(Optional) Optional membership ID to restrict the exchange to a specific ProjectMembership.

Returns:

Promise<ProfileResource>

The user profile resource.