Users

Get user

Deprecated

GET
/api/v2/users/{projectKey}/{environmentKey}/{userKey}

Use contexts instead

After you have upgraded your LaunchDarkly SDK to use contexts instead of users, you should use Get context instances instead of this endpoint.

Get a user by key. The user object contains all attributes sent in variation calls for that key.

Authorization

ApiKey read, write
Authorization<token>

In: header

Scope: read, write

Path Parameters

projectKey*string

The project key

Formatstring
environmentKey*string

The environment key

Formatstring
userKey*string

The user key

Formatstring

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/api/v2/users/string/string/string"
{  "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": {      "property1": null,      "property2": null    },    "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": {          "resources": [            "proj/*:env/*;qa_*:/flag/*"          ],          "notResources": [            "string"          ],          "actions": [            "*"          ],          "notActions": [            "string"          ],          "effect": "allow",          "role_name": "string"        }      }    ],    "allowed": [      {        "action": "string",        "reason": {          "resources": [            "proj/*:env/*;qa_*:/flag/*"          ],          "notResources": [            "string"          ],          "actions": [            "*"          ],          "notActions": [            "string"          ],          "effect": "allow",          "role_name": "string"        }      }    ]  }}