Add User

WCF


Method
public AuthServerResponse AddUser(string authServerPartnerLoginName, 
                 string authServerPartnerLoginPassword, 
                 string authServerPartnerUserLoginName,
                 string firstName,
                 string lastName,
                 string mobile,
                 string email,
                 string pw, 
                 short  userStatus)

WCF parameterdata typedescription
authServerPartnerLoginNamestringSurePassID account login name
authServerPartnerLoginPasswordstringSurePassID account login key
authServerPartnerUserLoginNamestringUser account login name
firstNamestringFirst name. Empty value leaves the current value as is.
lastNamestringLast Name. Empty value leaves the current value as is.
mobilestringMobile device number. The  format is: +aaa(bbb)cccccccc where aaa is country code , bbb is area code and ccccccc is the local number. For example.  US: +1(800)200-8411 UK: +44(0)20 1234 5678. Empty value leaves the current value as is.
emailstringEmail. Empty value leaves the current value as is.
pwstring

Users new password. This can be plain text or base64 hash. In either case, the password will be encrypted by the server. Empty value leaves the current value as is. If the value is a base64 hash then pre-append the password with hash algorithm identifier {shaxxx}  where xx is 256, 384 or 512 for the hash type.

userStatusshort0 - user is enabled, 1 - user is disabled
Sample WCF C# Method
AuthServerResponse  resp = AddUser("accountLogin",             
            "accountKey", 
            "Mandy", 
             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
typestringupdate_user
firstNamestringFirst name. If omitted, the value is not updated.
lastNamestringLast Name. If omitted, the value is not updated.
mobilestringMobile device number. The  format is: +aaa(bbb)cccccccc where aaa is country code , bbb is area code and ccccccc is the local number. For example.  US: +1(800)200-8411 UK: +44(0)20 1234 5678. If omitted, the value is not updated.
emailstringEmail. If omitted, the value is not updated.
pwstringUsers new password. This can be plain text or base64 hash. In either case, the password will be encrypted by the server. Empty value leaves the current value as is. If the value is a base64 hash then pre-append the password with hash algorithm identifier {shaxxx}  where xx is 256, 384 or 512 for the hash type.
userStatusshort0 - user is enabled, 1 - user is disabled
Sample REST/Json Method
 {  
  "username": "Mandy",
  "spAccountLoginName": "accountLogin",
  "spAccountLoginKey": "accountKey",
  "firstName": "New First Name",
  "lastName": "New Last Name",        // do not update this leave it as it is.
  "mobile": "+1(345)123-4567",
  "email": "mandy@newco.com",
  "userStatus": 0,                    // enabled 
  "type": "add_user",


}
Sample REST/Json Response
 {
  "errorCode": 0,
  "errorMessage": "OK",
  "type": "add_user"
}