Organization membership requests
These methods on the Organization
object allow you to manage the membership requests for an organization.
The following examples assume:
- you have followed the quickstart in order to add Clerk to your JavaScript application
- you have enabled the Organizations feature in your Clerk Dashboard
- you have enabled Verified domains and Automatic suggestion for your organization
getMembershipRequests()
Retrieve the list of membership requests for the currently active organization.
- Name
initialPage?
- Type
number
- Description
A number that can be used to skip the first n-1 pages. For example, if
initialPage
is set to 10, it is will skip the first 9 pages and will fetch the 10th page.
- Name
pageSize?
- Type
number
- Description
A number that indicates the maximum number of results that should be returned for a specific page.
- Name
status?
- Type
string
- Description
The status of the membership requests that will be included in the response.
Returns
Type | Description |
---|---|
Promise<ClerkPaginatedResponse<OrganizationMembershipRequestResource>> | This method returns a Promise that resolves to a ClerkPaginatedResponse of OrganizationMembershipRequest objects. |
Example
The following example demonstrates how to use the getMembershipRequests()
method to render a table of membership requests for the active organization. To ease the development process, the response or error message of a method will be displayed on the user interface.
For the following example, your HTML file should look like this:
And your JavaScript file should look like this:
Feedback
Last updated on