So I am trying to redo this code but C++ https://bitbucket.org/jitbit/sharpgooglevoice/src/0d76122c5bd7f4000352e003c9990d62f2421693/SharpGoogleVoice.cs?at=default
However, I think my code is identical but it doesn't seem to be working.
int SendSMS(string number, string msg)
{
Login();
curl_easy_setopt(curl, CURLOPT_URL, "https://www.google.com/voice/sms/");
curl_easy_setopt(curl, CURLOPT_POST, 1);
number = curl_easy_escape(curl, number,0);
rnr_se = curl_easy_escape(curl, rnr_se.c_str(),0);
string data = "sendphoneNumber=" + number;
data += "&text=" + msg;
data += "&_rnr_se=" + rnr_se;
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data.c_str());
cr = curl_easy_perform(curl);
}
However nothing happens. I know Login() works correctly as I am able to Login and check the messages. My output is the same output as in the C# code but for some reason this doesnt do anything
The url format should be this POST /voice/sms/send/ phoneNumber=[number to text]&text=[URL Encoded message]&_rnr_se=[pull from page]