Click or drag to resize
ZenophSMSauthenticate Method
Authenticates a user for messaging.

Namespace: Zenoph.SMSLib
Assembly: Zenoph.SMSLib (in Zenoph.SMSLib.dll) Version: 2015.9.30.0 (2015.09.30.0)
Syntax
public void authenticate()
Exceptions
ExceptionCondition
SMSException Thrown if authentication parameters are invalid or when authentication fails.
Exception Throws for not caught by SMSException.
Remarks

On successful authentication, some user and server settings are loaded that are required for sending messages. It is therefore important for authentication to be performed before setting message parameters. Failure to perform authentication before setting message parameters may throw Exception for some method calls.

The account login and password must be set before calling this method as demonstrated below:

// Initialise SMS object and perform authentication.
ZenophSMS sms = new ZenophSMS();
sms.setUser("account_login");
sms.setPassword("account_password");

// now perform the authentication
sms.authenticate();

// perform other tasks below.

If authentication is successful, the application will continue to perform other tasks after the authentication. For unsuccessful authentication, SMSException will be thrown.

See Also