---
title: "Get flag setting for user"
method: GET
path: "/api/v2/users/{projectKey}/{environmentKey}/{userKey}/flags/{featureFlagKey}"
tags: ["User settings"]
deprecated: true
---

# Get flag setting for user

`GET /api/v2/users/{projectKey}/{environmentKey}/{userKey}/flags/{featureFlagKey}`

> **Deprecated.**

Get a single flag setting for a user by flag key. <br /><br />The `_value` is the flag variation that the user receives. The `setting` indicates whether you've explicitly targeted a user to receive a particular variation. For example, if you have turned off a feature flag for a user, this setting will be `false`. The example response indicates that the user `Abbie_Braun` has the `sort.order` flag enabled.

## Path parameters

- `projectKey` string, string, required — The project key
- `environmentKey` string, string, required — The environment key
- `userKey` string, string, required — The user key
- `featureFlagKey` string, string, required — The feature flag key

## Response `200`

User flag settings response

- UserFlagSetting
  - `_links` object, required — The location and content type of related resources.
  - `_value` string, required — The value of the flag variation that the user receives. If there is no defined default rule, this is null.
  - `setting` string, required — Whether the user is explicitly targeted to receive a particular variation. The setting is false if you have turned off a feature flag for a user. It is null if you haven't assigned that user to a specific variation.
  - `reason` EvaluationReason
    - `kind` string, required — Describes the general reason that LaunchDarkly selected this variation.
    - `ruleIndex` integer — The positional index of the matching rule if the kind is 'RULE_MATCH'. The index is 0-based.
    - `ruleID` string — The unique identifier of the matching rule if the kind is 'RULE_MATCH'.
    - `prerequisiteKey` string — The key of the flag that failed if the kind is 'PREREQUISITE_FAILED'.
    - `inExperiment` boolean — Indicates whether the evaluation occurred as part of an experiment.
    - `errorKind` string — The specific error type if the kind is 'ERROR'.

## Other responses

- `400` — Invalid request
- `401` — Invalid access token
- `403` — Forbidden
- `404` — Invalid resource identifier
- `429` — Rate limited

---

[API](https://skmtc.dev/launchdarkly/apis/launchdarkly-rest-api.md) · [All operations](https://skmtc.dev/launchdarkly/apis/launchdarkly-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/launchdarkly/launchdarkly-rest-api/revisions/69c5c9aafe78/schema)
