Skip to main content
GET
/
api
/
v2
/
users
/
{projectKey}
/
{environmentKey}
/
{userKey}
Get user
curl --request GET \
  --url https://app.launchdarkly.com/api/v2/users/{projectKey}/{environmentKey}/{userKey} \
  --header 'Authorization: <api-key>'
{
  "lastPing": "2022-06-28T23:21:29.176609596Z",
  "environmentId": "1234a56b7c89d012345e678f",
  "ownerId": "12ab3c45de678910abc12345",
  "user": {
    "key": "user-key-123abc",
    "secondary": "2398127",
    "ip": "10.10.10.10",
    "country": "United States",
    "email": "sandy@example.com",
    "firstName": "Sandy",
    "lastName": "Smith",
    "avatar": "http://example.com/avatar.png",
    "name": "Sandy Smith",
    "anonymous": false,
    "custom": {},
    "privateAttrs": [
      "<string>"
    ]
  },
  "sortValue": "user-key-123abc",
  "_links": {
    "parent": {
      "href": "/api/v2/users/my-project/my-environment",
      "type": "application/json"
    },
    "self": {
      "href": "/api/v2/users/my-project/my-environment/my-user",
      "type": "application/json"
    },
    "settings": {
      "href": "/api/v2/users/my-project/my-environment/my-user/flags",
      "type": "text/html"
    },
    "site": {
      "href": "/my-project/my-environment/users/my-user",
      "type": "text/html"
    }
  },
  "_access": {
    "denied": [
      {
        "action": "<string>",
        "reason": {
          "effect": "allow",
          "resources": [
            "proj/*:env/*;qa_*:/flag/*"
          ],
          "notResources": [
            "<string>"
          ],
          "actions": [
            "*"
          ],
          "notActions": [
            "<string>"
          ],
          "role_name": "<string>"
        }
      }
    ],
    "allowed": [
      {
        "action": "<string>",
        "reason": {
          "effect": "allow",
          "resources": [
            "proj/*:env/*;qa_*:/flag/*"
          ],
          "notResources": [
            "<string>"
          ],
          "actions": [
            "*"
          ],
          "notActions": [
            "<string>"
          ],
          "role_name": "<string>"
        }
      }
    ]
  }
}

Documentation Index

Fetch the complete documentation index at: https://launchdarkly-preview.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Path Parameters

projectKey
string<string>
required

The project key

environmentKey
string<string>
required

The environment key

userKey
string<string>
required

The user key

Response

User response

lastPing
string<date-time>

Timestamp of the last time this user was seen

Example:

"2022-06-28T23:21:29.176609596Z"

environmentId
string

The environment ID

Example:

"1234a56b7c89d012345e678f"

ownerId
string

The ID of the member who is the owner for this account

Example:

"12ab3c45de678910abc12345"

user
object

Details on the user

sortValue
any

If this record is returned as part of a list, the value used to sort the list. This is only included when the sort query parameter is specified. It is a time, in Unix milliseconds, if the sort is by lastSeen. It is a user key if the sort is by userKey.

Example:

"user-key-123abc"

The location and content type of related resources

Example:
{
"parent": {
"href": "/api/v2/users/my-project/my-environment",
"type": "application/json"
},
"self": {
"href": "/api/v2/users/my-project/my-environment/my-user",
"type": "application/json"
},
"settings": {
"href": "/api/v2/users/my-project/my-environment/my-user/flags",
"type": "text/html"
},
"site": {
"href": "/my-project/my-environment/users/my-user",
"type": "text/html"
}
}
_access
object

Details on the allowed and denied actions for this user