VB.net Synchronous
Add the API
In VB.net you should add the following to any .cs files that need to use the API.
Imports
ToucanText.Api.SenderApi
Run the Code
To use the API create a new instance of the MessageSender();
object. Replace the user name and password with your Toucan API user name and password.
Dim messageSender As MessageSender =new
MessageSender("userName"
,"password"
)
Parameters
The Toucan Text user name as provided
Your password as generated during sign up
Either an alphanumeric sender or an inbound number to use as the sender. Numbers should be specified in the format 441234567890 (note: + is not required)
The mobile number of the destination for the message. Numbers should be specified in the format 441234567890 (note: + is not required)
The message content
Get the Code
To send a message use the SendMessage();
method. The sender address can be an alphanumeric or numeric (depending on the country).
Dim messageSender As MessageSender =new
MessageSender("userName"
,"password"
) messageSender.SendMessage("sourceAddress"
,"destinationAddress"
,"message"
)
ToucanText API Requirements
Download the DLL wrapper file and add The DLL reference to your project.
Download ToucanText .Net API v2.3Target Application
The ToucanText .NET API requires a minimum of .NET Framework 4.5 or .NET Core 2.0 to operate.
If your application targets .NET Framework 4.6.1 or later, we recommend using the .NET Standard 2.0 assembly.
If your application targets .NET Core 2.0 or later, we recommend using the .NET Standard 2.0 assembly.
If your application requires portability to different operating systems such as Linux, then we recommend targeting .NET Core 2.0 or later and using the .NET Standard 2.0 assembly.