All eMessage Web Services expose some web methods to call to obtain information or to send messages. Every web method returns a class inherited from Result. Result is a class with these mandatory fields: - Success: a Boolean value indicating a successfully call. - Data: a string value indicating call’s result. - Error: a text describing what error happened during call. - CodeError: a number that indicates the error generated during call. - OptionalResults: a list of optional results. If an error occurs during web services calling a SOAP exception is immediately thrown. Every web methods fields must be passed if mandatory; otherwise, you can pass a null value (or zero value from numerical fields). Some web method calls may take some time (for example sending hundreds of sms in one call) so configure your clients timeout so they will wait for a reply from eMessage Web Services.
To consume eMessage Web Services you need a eMessage account. To create an account send a request to info@CT Consulting.cloud; you can also call SignUp web method. To check how much credit has a eMessage account, you can use GetCredits web method Finally, to check if an account is valid, you can use CheckUserCanLogin web method.
Web Service URL: http://ct.emessage.it/webservices/WSUsers.asmx Method name: GetSettings Description Web method to get user settings. Parameter - Username (MANDATORY): account username. - Password (MANDATORY): account password. - Key (MANDATORY): settings key name. (see appendix L) Returns - This web method return a standard Result class. - Data: setting value.
Web Service URL: http://ct.emessage.it/webservices/WSUsers.asmx Method name: SetSettings Description Web method to get user settings. Parameter - Username (MANDATORY): account username. - Password (MANDATORY): account password. - Key (MANDATORY): settings key name. (see appendix L) Returns - This web method return a standard Result class.
Web Service URL: http://ct.emessage.it/webservices/WSUsers.asmx Method name: GetCredits Description Web method to check credit of your account. Parameter - Username (MANDATORY): account username. - Password (MANDATORY): account password. Returns This web method return a standard Result class: - Result: credit formatted with currency set in settings. - OptionalResult: CreditsWithoutFormat - credit value (unformatted). Warning: if your account is postpaid, Result is postpaid and OptionalResult is empty.
Web Service URL: http://ct.emessage.it/webservices/WSUsers.asmx Method name: CheckUserCanLogin Description Web method to check if user can make login. Parameter - Username (MANDATORY): account username. - Password (MANDATORY): account password. Returns This web method return a standard Result class: - Data: user id.
Web Service URL: http://ct.emessage.it/webservices/WSUsers.asmx Method name: SignUp Description This method allows you to create a eMessage user with its root or group. Parameter - Username (MANDATORY): account username. - Password (MANDATORY): account password. - eMail (MANDATORY): user email address. - FirstName (MANDATORY): user first name. - LastName (MANDATORY): user last name. - Company: account company. - PhoneNumber: user phone number. - CountryIsoCode (MANDATORY): user country code, ex:”IT” (see appendix E). - Params: optional parameters array (future use, you must set NULL). Returns This web method return a standard Result class.