Skip to content

DataAPI SDK english MT.DataAPI Endpoint method getUser

Taku AMANO edited this page Aug 28, 2013 · 2 revisions

getUser

Retrieve an user.

GET https://your-host/your-mt-api.cgi/v1/users/:user_id Detail

Parameters

Name Type Required Description
userId Number | Object | Function yes User ID
params Object no Options
callback Function no

Returns

XMLHttpRequest: A XMLHttpRequest object

Example

api.getUser(userId, function(response) {
  if (response.error) {
    // Handle error
    return;
  }

  // Do stuff
});

Or

api.getUser(userId, {fields: "displayName,email,url,userpicUrl"}, function(response) {
  if (response.error) {
    // Handle error
    return;
  }

  // Do stuff
});
Clone this wiki locally