Sudo7X Login for Sugar ( minimal functionality which not involve yet REST API)
Simply goto desired user and click on "Login as {username}"
Based On Karl Metum Code: https://gist.github.com/karlingen/5265c27ad78fb83fb774
{ "grant_type":"password", "client_id":"sugar", "client_secret":"", "username":"admin", "password":"password", "platform":"myspecialapp" // change 'myspecialapp' to whatever you want to refer to your app as }
var username = "someuser";
$.ajax({
url: '/rest/v10/oauth2/sudo/' + username,
headers: { "OAuth-Token": app.api.getOAuthToken() },
success: function(data)
{
console.log(data);
},
type: "POST",
async: false
});