MGB SMS API Listing

To access these APIs, contact support to obtain a matching pair of API Username/Password combinations that are active and valid.  These credential sets are unique to each environment: Test, Staging, UAT and/or Production.  The IP Addresses of your calling servers must be entered into our database whitelist, by environment, prior to usage.  Each account must also be given specific authority to execute each endpoint.  Specific URLs will be given once your account is approved.  Verify that ValidateConnection (under "MGB SMS API Support Calls") works before attempting any other calls.

Validates that the given Mobile Number is, in fact, a valid phone number.  When Valid is true, the Mobile Number value returned in the field PhoneNumber should be used in subsequent calls, as it is properly formatted.
O/R
Parameter
Type
Description
Req
CallerGUID char(36) Assigned Caller GUID for this environment.
Req
CallerPW char(36) Assigned Caller Password for this environment.
Req
MobileNumber varchar(25) The Mobile Number to be validated.
Responses Description
Success - Valid Phone Number Phone number is a valid phone number.
JSON: {"Status":"Success", "CallingCountryCode":1, "CountryCode":"US", "NationalFormat":"(212) 555-1212", "PhoneNumber":"+12125551212", "Valid":true}
Success - Invalid Phone Number Phone number is NOT a valid phone number.
JSON: {"Status":"Success", "CallingCountryCode":0, "CountryCode":null, "NationalFormat":"212551212", "PhoneNumber":"+1212551212", "Valid":false}
Authentication Failure Either Username, Password, IP Address or API Access is not valid for the given environment.
JSON: {"Status":"Authentication Failure"}
Error An unknown error has occurred.
JSON: {"Status":"Error"}

Sends a random One Time Passcode to the Mobile Number.  The OTPGUID returned is required in the subsequent call to MobileOTPValidate.
O/R
Parameter
Type
Description
Req
CallerGUID char(36) Assigned Caller GUID for this environment.
Req
CallerPW char(36) Assigned Caller Password for this environment.
Req
MobileNumber varchar(25) The Mobile Number to be validated.
Req
ClientIPAddress varchar(45) The IP Address of the Client asking to have a One Time Passcode sent to them.
Responses Description
Success Returns a Mobile OTP GUID to verify the user-entered passcode.
JSON: {"Status":"Success", "OTPGUID":"abcde-xxxxx-12345"}
Failure An invalid phone number was passed in.
JSON: {"Status":"Failure", "Field":"PhoneNumber", "Description":"Invalid"}
Error An unknown error occurred.
JSON: {"Status":"Error"}
Authentication Failure Either Username, Password, IP Address or API Access is not valid for the given environment.
JSON: {"Status":"Authentication Failure"}

Validates a One Time Passcode.  Use the OTPGUID from the MobileOTPSend call.
O/R
Parameter
Type
Description
Req
CallerGUID char(36) Assigned Caller GUID for this environment.
Req CallerPW char(36) Assigned Caller Password for this environment.
Req
MobileNumber varchar(25) The Mobile Number to be validated.
Req
OTPGUID varchar(45) The OTP Validation GUID
Req
OneTimePasscode varchar(15) The code entered by the user that was texted to their mobile number.
Req
IPAddress varchar(45) The IP Address of the Client asking to have a One Time Passcode sent to them.
Responses Description
Success The One Time Passcode matches.
JSON: {"Status":"Success"}
Failure The One Time Passcode does not match.
JSON: {"Status":"Failure"}
Failure Invalid Mobile Number.
JSON: {"Status":"Failure","Field":"MobileNumber","Description":"Invalid"}
Authentication Failure Either Username, Password, IP Address or API Access is not valid for the given environment.
JSON: {"Status":"Authentication Failure"}

Sends an outgoing Short Message Service message.  The text provided is delivered to the Mobile Number requested.
O/R
Parameter
Type
Description
Req
CallerGUID char(36) Assigned Caller GUID for this environment.
Req
CallerPW char(36) Assigned Caller Password for this environment.
Req
MobileNumber varchar(25) The Mobile Number to be validated.
Req
Message nvarchar(500) The message to be sent to the mobile number.
Responses Description
Success The text message was sent successfully.
JSON: {"Status":"Success"}
Failure The text message was not sent.
JSON: {"Status":"Failure"}
Authentication Failure Either Username, Password, IP Address or API Access is not valid for the given environment.
JSON: {"Status":"Authentication Failure"}

Receives any incoming mobile text messages.  Some additional setup is required.  While technically there are no APIs required, the functionality is listed here for completeness.
You will need to provide a CallBack URL or a Custom API Call will need to be written for realtime delivery of incoming messages.  You will need to write code to handle incoming text messages in order to handle events or repsond correctly.  You will be assigned mobile number across which outgoing & incoming messages will be sent.

The ValidateConnection endpoint will validate a UN/PW combination as well as exercise our internal whitelist of your preloaded IP Addresses, by environment.  This should to be the first API tested.  Once this call works successfully, you'll know your credentials and IP Address are current and valid for the given environment.
O/R
Parameter
Type
Description
Req
CallerGUID char(36) Assigned Caller GUID for this environment.
Req CallerPW char(36) Assigned Caller Password for this environment.
Responses Description
Success Match on Username/Password/IP Address/API Access for the given environment.
JSON: {"Status":"Success"}
Authentication Failure Either Username, Password, IP Address or API Access is not valid for the given environment.
JSON: {"Status":"Authentication Failure"}

The ServerPing endpoint will validate that the server is online and responding by providing only your UN; as well as exercising our internal whitelist of your preloaded IP Addresses, by environment.  This call is a very quick method that can be used to determine that the server is up and running.  It executes more quickly than ValidateConnection.
O/R
Parameter
Type
Description
Req
CallerGUID char(36) Assigned Caller GUID for this environment.
Responses Description
Success Match on Username/IP Address/API Access for the given environment.
JSON: {"Status":"Success"}
Authentication Failure Either Username, IP Address or API Access is not valid for the given environment.
JSON: {"Status":"Authentication Failure"}