Reading User Accounts

Reading User Accounts

The read user account operation returns the user account object from the Users content type with the exception of sensitive fields such as Password.

Current user

In order to retrieve the profile data of the currently logged user execute the following request:

$.ajax({
    type: "GET",
    url: 'https://api.everlive.com/v1/your-app-id/Users/me',
    headers: {"Authorization" : "Bearer your-access-token-here"},
    success: function (data) {
        alert(JSON.stringify(data));
    },
    error: function (error) {
        alert(JSON.stringify(error));
    }
});

Single user

To get the information about single user you must pass the id in the URL.

//Ajax request using jQuery
$.ajax({
    url: 'https://api.everlive.com/v1/your-app-id/Users/item-id-here',
    type: "GET",
    headers: {
        "Authorization": "Bearer your-access-token-here"
    },
    success: function (data) {
        alert(JSON.stringify(data));
    },
    error: function (error) {
        alert(JSON.stringify(error));
    }
});
Request:
    GET https://api.everlive.com/v1/your-app-id/Users/item-id-here
Headers:
    Authorization  Bearer your-access-token-here
Response:
    Status: 200 OK
    Content-Type: application/json

Multiple users

Getting all users can be accomplished too. The requests is as follows:

//Ajax request using jQuery
$.ajax({
    url: 'https://api.everlive.com/v1/your-app-id/Users',
    type: "GET",
    headers: {
        "Authorization": "Bearer your-access-token-here"
    },
    success: function (data) {
        alert(JSON.stringify(data));
    },
    error: function (error) {
        alert(JSON.stringify(error));
    }
});
Request:
    GET https://api.everlive.com/v1/your-app-id/Users
Headers:
    Authorization  Bearer your-access-token-here
Response:
    Status: 200 OK
    Content-Type: application/json

Get users by filter

This example shows how to retrieve users by applying a filter. In this case the filter is "DisplayName".

var filter = { "DisplayName" : "Harper Lee" };

//Ajax request using jQuery
$.ajax({
    url: 'https://api.everlive.com/v1/your-app-id/Users',
    type: "GET",
    headers: {
        "Authorization": "Bearer your-access-token-here",
        "X-Everlive-Filter": JSON.stringify(filter)
    },
    success: function (data) {
        alert(JSON.stringify(data));
    },
    error: function (error) {
        alert(JSON.stringify(error));
    }
});
Request:
    GET https://api.everlive.com/v1/your-app-id/Users
Headers:
    Authorization  Bearer your-access-token-here
    X-Everlive-Filter { "DisplayName" : "Harper Lee" }
Response:
    Status: 200 OK
    Content-Type: application/json
Start a free trial Request a demo
Contact us: +1-888-365-2779
sales@telerik.com
Copyright © 2016-2017, Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.