provider Segments GET /api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/users/{userKey}
@utdk/launchdarkly /api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/users/{userKey}
Get big segment membership for user
> ### Contexts are now available > > After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Get expiring targets for segment](https://launchdarkly.com/docs/api/segments/get-expiring-targets-for-segment) instead of this endpoint. To learn more, read [Contexts](https://launchdarkly.com/docs/home/observability/contexts). Get the membership status (included/excluded) for a given user in this big segment. This operation does not support standard segments.
projectKey path required
The project key
string
environmentKey path required
The environment key
string
segmentKey path required
The segment key
string
userKey path required
The user key
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.

getsegmentmembershipforuser
GET/api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/users/{userKey}
> ### Contexts are now available > > After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use [Get expiring targets for segment](https://launchdarkly.com/docs/api/segments/get-expiring-targets-for-segment) instead of this endpoint. To learn more, read [Contexts](https://launchdarkly.com/docs/home/observability/contexts). Get the membership status (included/excluded) for a given user in this big segment. This operation does not support standard segments.

Parameters

required

The project key

required

The environment key

required

The segment key

required

The user key

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.getsegmentmembershipforuser()