HostLogin(APIServerType, String, String, Boolean) Method
Displays a login dialog to the user that also handles password expiry and password changing. Returns a logged in Host object if successful or Nothing if the user cancels the dialog.
Namespace: T4.APIAssembly: T4API.47 (in T4API.47.dll) Version: 4.7.0.0 (4.7.68.4)
public static Host Login(
APIServerType penServer,
string psAppName,
string psAppLicense,
bool pbSubscribeToAccounts
)
Public Shared Function Login (
penServer As APIServerType,
psAppName As String,
psAppLicense As String,
pbSubscribeToAccounts As Boolean
) As Host
- penServer APIServerType
- Whether the API should connect to the live or simulator system. Either APIServerType.Simulator or APIServerType.Live
- psAppName String
- The name of the application as stated when requesting an application license code. T4Example is a valid application on the simulator system only.
- psAppLicense String
- The license code for the application. 112A04B0-5AAF-42F4-994E-FA7CB959C60B is the license for T4Example on the simulator system. NOTE that license codes will be different between the live and simulator systems for the same application name.
- pbSubscribeToAccounts Boolean
- True if all the accounts this user can see should be subscribed to prior to returning. Note: Subscribe requests will be sent for all accounts, however the responses may not be received prior to returning. Check the Account.Complete properties
to see if accounts have actually been loaded.
HostA logged in Host object
This method will display a login dialog to the user allowing them to enter their details. This dialog also handles password change and expiration. Note that as this method displays
a dialog to the user this method won't return until the user exits the dialog. If they cancel it then 'Nothing' will be returned from this method. If login succeeds then the Host
object is returned. You will not receive LoginSuccess or LoginFailure events during initial login using this method as it will have been raised prior to the Host object being returned
to you.