WCF
Code Block |
---|
|
AuthServerU2FResponse SendOTP(string authServerPartnerLoginName,
string authServerPartnerLoginPassword,
string authServerPartnerUserLoginName,
string printedSerialNumber,
short deliveryMethod); |
WCF parameter | data type | description |
---|
authServerPartnerLoginName | string |
SurePassId SurePassID account login name |
authServerPartnerLoginPassword | string |
SurePassId SurePassID account login key |
authServerPartnerUserLoginName | string | User account login name |
printedSerialNumber | string | A specific device assigned to this user. If this is left empty then the first device assigned |
deliveryMethod | short | the method to send the pass code to the user. 0=sms, 1=email, 2=voice call |
Code Block |
---|
language | c# |
---|
title | Sample WCF C# Method |
---|
|
AuthServerU2FResponse resp = SendOTP(string authServerPartnerLoginName"accountLogin",
string authServerPartnerLoginPassword"accountKey",
string authServerPartnerUserLoginName"Mandy,
string printedSerialNumber"",
short deliveryMethod0); |
Code Block |
---|
language | c# |
---|
title | Sample WCF C# Repsonse |
---|
|
if (resp.ErrorCode != 0) {
message.Text = resp.ErrorMsg;
return false;
} |
REST
REST parameter | data type | description |
---|
spAccountLoginName | string |
SurePassId SurePassID account login name |
spAccountLoginKey | string |
SurePassId SurePassID account login key |
username | string | user account login name |
type | string | send_oath_otp |
printedSerialNumber | string | A specific device assigned to this user. If this is left empty then the first device assigned device is used |
deliveryMethod | string | the method to send the pass code to the user. values are sms, voice, email |
Code Block |
---|
language | js |
---|
title | Sample REST/Json Method |
---|
|
{
"username": "Mandy",
"spAccountLoginName": "accountLogin",
"spAccountLoginKey": "accountKey",
"type": "send_oath_otp",
"deliveryMethod": "sms"
} |
...
Code Block |
---|
language | js |
---|
title | Sample REST/Json Response |
---|
|
{
"errorCode": 0,
"errorMessage": "OK",
"type": "send_oath_otp"
} |
if
(resp.ErrorCode != 0) {
message.Text = resp.ErrorMsg;
return
false
;
...