Assign Device To User Account
WCF
Method
public AuthServerResponse AssginDevice(string authServerPartnerLoginName,
string authServerPartnerLoginPassword,
string authServerPartnerUserLoginName,
string printedSerialNumber,
bool force)
WCF parameter | data type | description |
|---|---|---|
authServerPartnerLoginName | string | SurePassID account login name |
authServerPartnerLoginPassword | string | SurePassID account login key |
authServerPartnerUserLoginName | string | User account name |
printedSerialNumber | string | Serial number of the device |
force | bool | true - Assign the device to the user even if the device is assigned false - Do not assign the device if it is currently assigned |
Sample WCF C# Method
AuthServerResponse resp = AssginDevice("accountLogin",
"accountKey",
"Mandy",
"OATH_1234567",
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 | assign_device |
psn | string | Serial number of the device |
force | short | 0 - Do not assign the device if it is currently assigned 1 - Assign the device to the user even if the device is assigned |
Sample REST/Json Method
{
"username": "Mandy",
"spAccountLoginName": "accountLogin",
"spAccountLoginKey": "accountKey",
"type": "assign_device",
"psn": "OATH_1234567",
"force": 0
}Sample REST/Json Response
{
"errorCode": 0,
"errorMessage": "OK",
"type": "assign_device"
}