i tried this but also not working

#!/usr/bin/perl use strict; use warnings; use LWP::UserAgent; use CGI::Carp qw(fatalsToBrowser warningsToBrowser); print "Content-type: text/html\n\n"; my $ua = LWP::UserAgent->new(); my $url = "https://api.twilio.com/2010-04-01/Accounts/AC9c1ff2d1880e4a +ff9d16d3a033b4631c/Messages.json"; my %form = ( To => "+156775562300", From => "+14155238886", Body => "Hello Friend", ); my $response = $ua->post( $url, 'Authorization' => 'Basic QUM5YzFmZjJkMTg4MGU0YWZmOWQxNmQzYTAzM2I0 +NjMxYzplYmFjZTRhYmQ0ZmY1NGM5NDNlZGFlZTg0YjJhMGY0MA==', 'Content-Type' => 'application/x-www-form-urlencoded', 'Content' => %form, ); if ($response->is_success) { print $response->decoded_content; } else { print $response->decoded_content; }

it does not read to phone number.

{"code": 21604, "message": "A 'To' phone number is required.", "more_info": "https://www.twilio.com/docs/errors/21604", "status": 400}

but your first example code worked very well, but only was for sms not whatsapp, the only problem was constructing this body

To=whatsapp:+2123456789&From=whatsapp:+14155238886&Body=hey test msg

because this worked very well, but its not the request i want to send. you bypassed my question

Body=This\x2520is\x2520the\x2520ship\x2520that\x2520made\x2520the\x2520Kessel\x2520Run\x2520in\x2520fourteen\x2520parsecs\x253F&From=\x252B15017122661&To=\x252B15558675310

In reply to Re^4: parsing curl api by frank1
in thread parsing curl api by frank1

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.