Users
Get user
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.
get/api/v2/users/{projectKey}/{environmentKey}/{userKey}
Path parameters
projectKeystring string required
The project key
The project key
environmentKeystring string required
The environment key
The environment key
userKeystring string required
The user key
The user key
Response
User response
Example response
{
"lastPing": "2022-06-28T23:21:29.176609596Z",
"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"
},
"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": [
{
"reason": {
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
],
"effect": "allow"
}
}
],
"allowed": [
{
"reason": {
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
],
"effect": "allow"
}
}
]
}
}