This csharp project is most suitable for Visual Studio Community 2017.
Ensure that the current source control plug-in is set to Git:
- Click the
Tools
>Options
... main menu item to open the Options dialog window. - Select the Source Control tree view item to open the Plug-in Selection tab page.
- Select the
Git
selection in the Current source control plug-in: option.
Clone to local git repositories via Team Explorer:
- Click the
Team
>Manage Connection
main menu item to open the Team Explorer connection manager. - Select the
Clone
option from theLocal Git Repositories
section. - Paste the repo location https://github.com/smsglobal/example-csharp-rest-client.git into the applicable url field.
- Click the
Clone
button to begin the project cloning process. - Click the
Home
button in the Team Explorer main menu. - Select the
Open
option from theSolutions
section. - Open the example-csharp-rest-client.sln file located in the cloned repository.
Add the following reference, Newtonsoft.Json and System.Net.Http.Formatting:
- Click the
Tools
>NuGet Package Manager
>Manage NuGet Packages for Solution
main menu item to open the NuGet Package Manager. - Click the
Browse
tab and search forNewtonsoft.Json
and select the top most search result. - Check
SMSGlobal.SMS
under theVersion(s)
sections. - Click the
Install
button beside the latest version selection (accept review changes and licences as applicable). - Click the
Browse
tab and search forSystem.Net.Http.Formatting
and select the top most search result. - Check
SMSGlobal.SMS
under theVersion(s)
sections. - Click the
Install
button beside the latest version selection (accept review changes and licences as applicable).
Update the App.config file with api key information:
- Open the
App.config
file in theexample-csharp-rest-client
folder. - Place the appropriate value for the
rest_key
. - Place the appropriate value for the
rest_secret
.
Update the Program.cs file with appropriate send sms message test data:
- Open the
Program.cs
file in theexample-csharp-rest-client
folder. - Place the appropriate value for the
origin
number. - Place the appropriate value for the
destination
number.
Try the client:
- Press Ctrl + F5 to run the console window application and see the output displayed.
Please note that charges will apply to the account when sending message.