provider Users GET /api/v2/users/{projectKey}/{environmentKey}
@utdk/launchdarkly /api/v2/users/{projectKey}/{environmentKey}
List users
> ### Use contexts instead > > After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Search for contexts](https://launchdarkly.com/docs/api/contexts/search-contexts) instead of this endpoint. List all users in the environment. Includes the total count of users. This is useful for exporting all users in the system for further analysis. Each page displays users up to a set `limit`. The default is 20. To page through, follow the `next` link in the `_links` object. To learn more, read [Representations](https://launchdarkly.com/docs/api#representations).
projectKey path required
The project key
string
environmentKey path required
The environment key
string
limit query
The number of elements to return per page
integer
searchAfter query
Limits results to users with sort values after the value you specify. You can use this for pagination, but we recommend using the `next` link we provide instead.
string

Try it

Authentication
Configure credentials for LaunchDarkly REST API
Gateway
The gateway proxies requests and injects credentials server-side. Configure credentials above, then enter your gateway URL.

Saved automatically to browser storage.

getusers
GET/api/v2/users/{projectKey}/{environmentKey}
> ### Use contexts instead > > After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Search for contexts](https://launchdarkly.com/docs/api/contexts/search-contexts) instead of this endpoint. List all users in the environment. Includes the total count of users. This is useful for exporting all users in the system for further analysis. Each page displays users up to a set `limit`. The default is 20. To page through, follow the `next` link in the `_links` object. To learn more, read [Representations](https://launchdarkly.com/docs/api#representations).

Parameters

required

The project key

required

The environment key

The number of elements to return per page

Limits results to users with sort values after the value you specify. You can use this for pagination, but we recommend using the `next` link we provide instead.

Enter a gateway URL above to enable sending.

Code snippet
Updates live as you fill in the form above.

TypeScript

import launchdarkly from '@utdk/launchdarkly';

await launchdarkly.getusers()