Click or drag to resize

PointOfSaleClientAuthenticate Method

Authenticate POS Client Credentials. Returns a Token that enables access to the Point Of Sale End Point secure resources.

Syntax
C#
public ResultOfAuthenticate Authenticate(
	Credentials request
)

Parameters

request
Type: PointOfSaleServiceCredentials

Return Value

Type: ResultOfAuthenticate
Examples
C#
using (var svc = new PointOfSaleService.PointOfSaleClient())
{
  var request = new PointOfSaleService.Credentials(); //Required
  request.AccountName = "Account name"; //Required
  request.SecurityCode = "Password"; //Required

  PointOfSaleService.ResultOfAuthenticate result = svc.Authenticate(request);

  if (result.FaultCode == 0)
  {
    //Request succeded
    string token = result.Value.Token; //Use token in service calls.
  }
  else
  {
    //Request failed     
    throw new Exception(result.FaultDescription);
  }
}
See Also