Get user info

  • Since SDK: 19

Get auth token and user name. Either value may be empty.

adobe.dps.store.getUserInfo

Parameter Type Description
callback

getUserInfoFunction

Function that will be called with the user info: {"authToken":currentAuthToken, "userName": currentUsername}

getUserInfoFunction

Parameter Type Description
dictionary

getUserInfoResult

A dictionary containing the returned user information.
"authToken"

string

The authentication token for the user.
"userName"

string

The user's log-in name.

API Snippet

getUserInfo

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>getUserInfo API</title>
<script type="text/javascript">
function getUserInfo()
{
  // call into the getUserInfo API
  if (window.adobedpscontextloaded)
  {
    adobe.dps.store.getUserInfo(function(data)
      {
        document.write("<p>Auth Token: " + 
          data['authToken'] + " and Username: " + 
          data['userName'] + '</p>');
      }
    );
  }
}
</script>
</head>

<body>
<button type="button" onclick="getUserInfo()">Get User Info</button>
</body>
</html>