Set user info

  • Since SDK: 20

Assigns the auth token and user name for the viewer to persist. Only the authToken value is used to determine entitlement. The username is additional data availbale to the JS API and has no relation to user login credentials. To log a user out call this function wiht an empty authToken value. Notice that there is no callback for this function invalid values for either authToken or userName will make this function fail silently.

Parameter Type Description


String containing the auth token or undefined in order to sign out.


String containing the user name used to sign in or undefined to clear the persisted user name.

API Snippet


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>setUserInfo API</title>
<script type="text/javascript">
function setUserInfo()
  if (window.adobedpscontextloaded)
    var authToken = document.getElementById("authToken").value;
    var userName = document.getElementById("userName").value;
    // call into the setUserInfo API,userName);

<p>Set User Info</p> 
<input type="text" id="authToken" value="authToken"/>
<input type="text" id="userName" value="userName"/>
<button type="button" onclick="setUserInfo()">Set User Info</button>