Send an SMS Using VisualBasic .NET
The Textmagic API VisualBasic.NET wrapper can save you a lot of time, as it includes all the necessary API commands and tests. It only takes a few seconds to download it from GitHub and to install it into your own app or software. After installation, you’ll then be able to send text messages.
Get it now on GitHubInstallation Instructions
Visual Studio
- Open your project or create a new one.
- Right click on the References in Solution Explorer window and select Manage NuGet Packages.
- When the package manager dialog appears, type TextmagicRest in the search window.
- Click Install.
SharpDevelop
- Open your project or create a new one.
- Click Project and choose Manage packages.
- When the package manager dialog appears, type TextmagicRest in the search window.
- Click Install.
Manual installation via the Package Manager Console
- Open your project or create a new one.
- Open the NuGet Package Manager Console from the Tools menu.
- Type the following command in the console:
Install-Package TextmagicRest
Requirements
The VisualBasic.NET wrapper for the Textmagic API has the following requirements:
- NET 4.0 or higher
- RestSharp (= 105.1.0)
Sending an SMS in Visual Basic .NET (an example)
Below is an example on how to send SMS in Visual Basic .NET:
Imports TextmagicRest Imports TextmagicRest.Model ... Public Function SendMessage() Dim client = New Client("test", "my-api-key") Dim link = client.SendMessage("Hello from Textmagic API", "447860021130") If link.Success Then Console.WriteLine("Message with ID {0} has been successfully sent", link.Id) Else Console.WriteLine("Message was not sent due to following exception: " + link.ClientException.Message) End If End Function
Support
If you need help with the wrapper, or if you have any suggestions for improvements and/or if you have any enquiries regarding the VB.net SMS API, please contact us by emailing [email protected].