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
Gitselection in the Current source control plug-in: option.
Clone to local git repositories via Team Explorer:
- Click the
Team>Manage Connectionmain menu item to open the Team Explorer connection manager. - Select the
Cloneoption from theLocal Git Repositoriessection. - Paste the repo location https://github.com/smsglobal/example-csharp-rest-client.git into the applicable url field.
- Click the
Clonebutton to begin the project cloning process. - Click the
Homebutton in the Team Explorer main menu. - Select the
Openoption from theSolutionssection. - 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 Solutionmain menu item to open the NuGet Package Manager. - Click the
Browsetab and search forNewtonsoft.Jsonand select the top most search result. - Check
SMSGlobal.SMSunder theVersion(s)sections. - Click the
Installbutton beside the latest version selection (accept review changes and licences as applicable). - Click the
Browsetab and search forSystem.Net.Http.Formattingand select the top most search result. - Check
SMSGlobal.SMSunder theVersion(s)sections. - Click the
Installbutton beside the latest version selection (accept review changes and licences as applicable).
Update the App.config file with api key information:
- Open the
App.configfile in theexample-csharp-rest-clientfolder. - 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.csfile in theexample-csharp-rest-clientfolder. - Place the appropriate value for the
originnumber. - Place the appropriate value for the
destinationnumber.
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.