Add Push User Device

WCF


Method
public AuthServerResponse AddPushUserDevice(string authServerPartnerLoginName, 
                 string authServerPartnerLoginPassword, 
                 string authServerPartnerUserLoginName, 
                 string pw,
				 string deviceId,
				 int pushType,
				 string deviceName,
				 string token,
				 string relyingParty)
WCF parameterdata typedescription
authServerPartnerLoginNamestringSurePassID account login name
authServerPartnerLoginPasswordstringSurePassID account login key
authServerPartnerUserLoginNamestringUser account name
pwstringUser account password
deviceIdstringID of the device being added
pushTypeintegerPush type of the device being added, e.g. Android: 1, iOS: 2.
deviceNamestringName of the device being added
tokenstringPush registration token for the device being added
relyingPartystringName of the relying party requesting device addition.
Sample WCF C# Method
AuthServerResponse  resp = AddPushUserDevice("accountLogin",             
            "accountKey", 
            "Mandy", 
            "tinyD4nc3r",
	        "123435ASQR6364",
			"1",
			"A Device",
			"nKctODamlM4:CKrh_PC8kIb7OclJONHoA",
			"https://mysite.relayingparty.com");
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
typestringadd_push_user_device
pwstringUser account password
deviceIdstringID of the push device
pushTypeintegerPush type of mobile device
deviceNamestringName of device being added
tokenstringDevice push registration token
relyingPartystringName of the relying party requesting device addition.
Sample REST/Json Method
{
  "spAccountLoginName": "accountLogin",
  "spAccountLoginKey": "accountKey",
  "username": "mandy",
  "type": "add_push_user_device",
  "pw": "tinyD4nc3r",
  "deviceId": "123435ASQR6364",
  "pushType": "1",
  "deviceName": "aDevice",
  "token": "nKctODamlM4:CKrh_PC8kIb7OclJONHoA",
  "relyingParty": "https://mysite.relayingparty.com"
}
Sample REST/Json Response
 {
  "errorCode": 0,
  "errorMessage": "OK",
  "type": "add_push_user_device"
}