Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

WCF

 


Code Block
languagec#
title Method
        AuthServerU2FResponse SendOTP(string authServerPartnerLoginName, 
                     string authServerPartnerLoginPassword, 
                     string authServerPartnerUserLoginName, 
                     string printedSerialNumber, 
                     short deliveryMethod);


WCF parameterdata typedescription
authServerPartnerLoginNamestring
SurePassId
SurePassID account login name
authServerPartnerLoginPasswordstring
SurePassId
SurePassID account login key
authServerPartnerUserLoginNamestringUser account login name
printedSerialNumberstring

A specific device assigned to this user. If this is left empty then the first device assigned

deliveryMethodshortthe method to send the pass code to the user. 0=sms, 1=email, 2=voice call


Code Block
languagec#
titleSample WCF C# Method
 AuthServerU2FResponse resp = SendOTP(string authServerPartnerLoginName"accountLogin",
                     string authServerPartnerLoginPassword"accountKey", 
                     string authServerPartnerUserLoginName"Mandy, 
                     string printedSerialNumber"", 
                     short deliveryMethod0);


Code Block
languagec#
titleSample WCF C# Repsonse
if (resp.ErrorCode != 0)  {             
    message.Text = resp.ErrorMsg;       
    return false; 
}

 


REST


REST parameterdata typedescription
spAccountLoginNamestring
SurePassId
SurePassID account login name
spAccountLoginKeystring
SurePassId
SurePassID account login key
usernamestringuser account login name
typestringsend_oath_otp 
printedSerialNumberstring

A specific device assigned to this user. If this is left empty then the first device assigned

device is used 

deliveryMethodstringthe method to send the pass code to the user. values are sms, voice, email


Code Block
languagejs
titleSample REST/Json Method
{
  "username": "Mandy",
  "spAccountLoginName": "accountLogin",
  "spAccountLoginKey": "accountKey",
  "type": "send_oath_otp",
  "deliveryMethod": "sms"
}

...

Code Block
languagejs
titleSample REST/Json Response
 {
  "errorCode": 0,
  "errorMessage": "OK",
  "type": "send_oath_otp"
}

 

 

 if (resp.ErrorCode != 0)  {     
       message.Text = resp.ErrorMsg;
       return false;

...

}