Company
Date Published
Author
Néstor Campos
Word count
1743
Language
English
Hacker News points
None

Summary

You can send vCards with WhatsApp using C# and .NET by utilizing the Twilio Programmable Messaging service to share contact information in vCard format via WhatsApp. To start, you need to configure your Twilio account, create a static file host such as ngrok, generate a vCard file using the vCardLib library, and then send it through the Twilio SDK. The process involves loading configuration from user secrets, initializing the Twilio SDK with credentials, creating a message with the vCard file URL, and sending it to a recipient's WhatsApp number. Future improvements include adding more information to the vCard, using a real static file host service, and automatically cleaning up generated files.