Creating a user consent application using the .NET SDK
SMS marketing campaigns are a great way to engage customers. However it's vital to obtain consent before doing this. Countries such as the US and Canada and the EU GDPR framework require customers to explicitly consent to receiving messages before organizations can contact them. This means it is vital for any SMS campaign to provide recipients the ability to opt themselves in or out of receiving messages.
Note:
Before you can get started, you need to have completed the following prerequisites:
Set all SMS API configuration settings.
- The latest version of .NET with Long Term Support and a familiarity with how to create a new MVC app.
- The Receive an SMS Message Guide
In this tutorial we will build on what we learned from the Receive an SMS Message guide to create a console application that allows users to sign up to receiving SMS notifications. This application will create a new group called Sinch Pirates. It will then allow a user to do the following:
- Join the group by texting the keyword SUBSCRIBE. The application will add their phone number to Sinch Pirates. It will then send a confirmation message thanking them for joining and telling them the keyword for leaving the group.
- If they are already a member, leave the group by texting the keyword STOP. The application will remove their phone number from Sinch Pirates. It will then send a confirmation message expressing regret at their wish to leave and telling them the keyword for joining.
- In the event they text the group number but aren't a member, the application will send a reply thanking them for their interest and telling them the join keyword.
send
method. Additionally, we'll use the SDK to create a group and automatically add and remove phone numbers from it.Note:
While this tutorial provides more real-world context and supporting material than some of our other guides, it is still intended for demonstrative purposes. In a production environment, you will have to modify any provided code samples to ensure that you maintain the security, efficacy, and stability of your solutions.