Skip to main content

Client Application Endpoint

POST /admin/projects/:projectId/client

Creates a new ClientApplication. Posting to this endpoint creates a ClientApplication resource and a corresponding ProjectMembership resource.

Parameters

{
name: string;
description?: string;
redirectUri?: string;
accessPolicy?: Reference<AccessPolicy>;
identityProvider?: {
authorizeUrl?: string;
tokenUrl?: string;
userInfoUrl?: string;
clientId?: string;
clientSecret?: string;
useSubject?: boolean;
}
}

Example request

await medplum.post('admin/projects/:projectId/client', {
name: 'Hello World Client',
description: 'Client App for Medplum Hello World',
redirectUri: 'https://example.com/redirect',
accessPolicy: {
reference: 'AccessPolicy/access-policy-id',
},
});

Example Response

{
meta: {
project: ':projectId',
//...
},
resourceType: 'ClientApplication',
name: 'Hello World Client',
id: ':clientId',
secret: ':clientSecret',
description: 'Client App for Medplum Hello World',
redirectUri: 'https://example.com/redirect'
}