WCF
Add User
AuthServerResponseEnrollUser EnrollUser(String authServerPartnerLoginName, string authServerPartnerLoginPassword, string firstName, string lastName, string loginName, string loginPassword, string email, string mobilePhone, short deviceType, short otpType, short otpLength, short otpWindow, string pin, string deviceId, bool addDeviceOnly, short notificationMethod);
WCF parameter | data type | description |
---|---|---|
authServerPartnerLoginName | string | SurePassId account login name |
authServerPartnerLoginPassword | string | SurePassId account login key |
firstName | string | First name |
lastName | string | Last name |
loginName | string | User account login name |
loginPassword | string | Users password. If omitted one will be generated. If using Active Directory on the server this parameter is ignored. |
string | User email. Used for sending email notifications and temporary pass codes. | |
mobilePhone | string | Users mobile phone Used for sending voice or sms messages |
deviceType | short | Device Type |
otpType | short | OTP Type |
otpLength | short | The length of the desired OTP. |
otpWindow | short | The sliding window for OTP validation. For event based OTP Type this is the number of values > than the event counter that will be accepted. For time based OTP Type this is the number of seconds that will elapse before the OTP will change. |
pin | short | The pin associated with device for OTP Type that require a PIN |
deviceId | short | The deviceId to assign to this newly created device associated with this account. It is recommended you pass an empty string value. |
onlyAddDevice | bool | true = add user and add the device device, false= just add user; device will need to be added to user account later |
notificationMethod | short | send welcome message to user. 0 = none, 1=email, 2=sms |
Sample WCF C# Method
AuthServerResponseEnrollUser resp = EnrollUser("accountLogin", "accountKey", "Mandy", "Last", "Mandy", "M@5ndy58!", Mandy5@myco.com, "+1(407)555-1212, 0, // 1, // 6, // otp digits 30, // timewindow false, 0);
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 | add_oath_user |
firstName | string | First name |
lastName | string | Last name |
string | User email. Used for sending email notifications nd temporary pass codes. | |
pw | string | Users password. If omitted one will be generated. If using Active Directory on the server this parameter is ignored. |
mobile | string | Users mobile phone Used for sending voice or sms messages |
Sample REST/Json Method
{ "username": "Mandy", "spAccountLoginName": "accountLogin", "spAccountLoginKey": "accountKey", "type": "add_oath_user", "firstName": "Mandy5", "lastName": "Mandy5", "email": "Mandy5", "pw": "Mandy5", "mobile": "407-555-1212" }
Sample REST/Json Response
{ "errorCode": 0, "errorMessage": "OK", "type": "add_oath_user" }