# Send a message Note: Before you can get started, you need to do the following: - - [The latest version of .Net Core with **Long Term Support**](https://dotnet.microsoft.com/download) and a familiarity with how to create a new console application. Using the Conversation API, you can send messages to any channel you have configured. This tutorial shows you how to set up and send a message in a .Net Core application. Steps: 1. [Set up](#set-up-your-net-core-application) your .Net Core application 2. [Send](#send-your-first-message) your first message ## Set up your .Net Core application 1. Create a new folder where you want to keep your app project. Then, open a terminal or command prompt to that location. 2. Create a new .Net Core console app with the following command: ```shell dotnet new console ``` 3. Add the `Newtonsoft.Json` NuGet package. ```shell dotnet add package Newtonsoft.Json ``` ### Modify your application Note: This tutorial uses basic authentication for testing purposes. We recommend OAuth 2.0 authentication in a production environment. Read more about [authentication methods](/docs/conversation/api-reference/#authentication). 1. Open the `Program.cs` file in your project folder. Replace all of the code in the `Main` method with the following code: ```csharp SendMessage sendMessage = new SendMessage("App_Id", "Channel", "Identity"); sendMessage.send(sendMessage, "Access_Key", "Access_Secret", "Project_Id"); Console.ReadLine(); ``` 2. Assign your values to the following parameters: ParameterYour valueApp_IdFind your app ID on your Sinch [dashboard](https://dashboard.sinch.com/convapi/apps).Access_KeyFind your access key on your Sinch [dashboard](https://dashboard.sinch.com/settings/access-keys).Access_Secret Find your access secret on your Sinch [dashboard](https://dashboard.sinch.com/settings/access-keys).Note:Access secrets are only available during initial key creation.Project_IdFind your project ID on your Sinch [dashboard](https://dashboard.sinch.com/settings/project-management).ChannelThe channel you want to use to send the message. Available channels are configured for the app on your Sinch [dashboard](https://dashboard.sinch.com/settings/access-keys). This guide assumes you've started with an SMS channel, but you can use any channel configured for your app: SMSMESSENGERMMSRCSWHATSAPPVIBERVIBERBMINSTAGRAMTELEGRAMKAKAOTALKAPPLEBCLINEIdentityThe ID of the contact to which you want to send the message. 3. Save the file. 4. Next, create a new file in the project folder named `Message.cs`. Populate that file with the "Message.cs" code found on this page and save the file. This code sends a [text message](/docs/conversation/message-types/text-message/). 5. Before executing your code, you must first compile your application. Execute the following command: ```shell dotnet build ``` ## Send your first message Now you can execute the code and send your test message. Run the following command: ```shell dotnet run ``` You should receive a message in your configured messaging platform. ## Next steps Now that you know how to send a message, learn how to [handle an incoming message](/docs/conversation/getting-started/csharp/incoming-message). ## Additional resources Read the links below to learn more: - [Learn more about the `/messages` endpoint](/docs/conversation/api-reference/conversation/messages/) - [Learn more about different message types](/docs/conversation/message-types) - [Learn more about channels](/docs/conversation/channel-support) - [API specification](/docs/conversation/api-reference/)