Assign Device To User Account

WCF


Method
public AuthServerResponse AssginDevice(string authServerPartnerLoginName, 
                 string authServerPartnerLoginPassword, 
                 string authServerPartnerUserLoginName, 
                 string printedSerialNumber,
                 bool force)

WCF parameterdata typedescription
authServerPartnerLoginNamestringSurePassID account login name
authServerPartnerLoginPasswordstringSurePassID account login key
authServerPartnerUserLoginNamestringUser account name
printedSerialNumberstringSerial number of the device
forcebool

true - Assign the device to the user even if the device is assigned

false - Do not assign the device if it is currently assigned

Sample WCF C# Method
AuthServerResponse  resp = AssginDevice("accountLogin",             
            "accountKey", 
            "Mandy", 
            "OATH_1234567",
             false);
Sample WCF C# Repsonse
 if (resp.ErrorCode != 0)  {      
       message.Text = resp.ErrorMsg;
       return false;
 }


REST


REST parameterdata typedescription
spAccountLoginNamestringSurePassID account login name
spAccountLoginKeystringSurePassID account login key
usernamestringuser account login name
typestringassign_device
psnstringSerial number of the device
forceshort

0 - Do not assign the device if it is currently assigned

1 - Assign the device to the user even if the device is assigned

Sample REST/Json Method
 {  
  "username": "Mandy",
  "spAccountLoginName": "accountLogin",
  "spAccountLoginKey": "accountKey",
  "type": "assign_device",
  "psn": "OATH_1234567",
  "force": 0
 }
Sample REST/Json Response
 {
  "errorCode": 0,
  "errorMessage": "OK",
  "type": "assign_device"
}