WCF
Method
public AuthServerResponse AddUser(string authServerPartnerLoginName, string authServerPartnerLoginPassword, string authServerPartnerUserLoginName, string firstName, string lastName, string mobile, string email, string pw, short userStatus)
WCF parameter | data type | description |
---|---|---|
authServerPartnerLoginName | string | SurePassId account login name |
authServerPartnerLoginPassword | string | SurePassId account login key |
authServerPartnerUserLoginName | string | User account login name |
firstName | string | First name. Empty value leaves the current value as is. |
lastName | string | Last Name. Empty value leaves the current value as is. |
mobile | string | Mobile 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. |
string | Email. Empty value leaves the current value as is. | |
pw | string | 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. |
userStatus | short | 0 - 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 parameter | data type | description |
---|---|---|
spAccountLoginName | string | SurePassId account login name |
spAccountLoginKey | string | SurePassId account login key |
username | string | user account login name |
type | string | update_user |
firstName | string | First name. If omitted, the value is not updated. |
lastName | string | Last Name. If omitted, the value is not updated. |
mobile | string | Mobile 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. |
string | Email. If omitted, the value is not updated. | |
pw | string | 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. |
userStatus | short | 0 - 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" }