If it's any help, the Ruby code posted the following parameters

AccessKeyId => <accessKeyId>
Action => SendSms
Format => JSON
PhoneNumbers => 7766
RegionId => default
SignName => iiuy
SignatureMethod => HMAC-SHA1
SignatureNonce => 7e44843695e9a68247e15d3beb018b63
SignatureVersion => 1.0
TemplateCode => jkk
Timestamp => 2019-09-02T16:28:32Z
Version => 2017-05-25
Signature => TquzjlguNxK2WdUVVrfm4yYTHZI=

code snippet from rpc_client.rb

def default_params default_params = { 'Format' => 'JSON', 'SignatureMethod' => 'HMAC-SHA1', 'SignatureNonce' => SecureRandom.hex(16), 'SignatureVersion' => '1.0', 'Timestamp' => Time.now.utc.strftime('%Y-%m-%dT%H:%M:%S +Z'), 'AccessKeyId' => self.access_key_id, 'Version' => self.api_version, } default_params.merge!('SecurityToken' => self.security_token) if + self.security_token

Also this looks wrong

$req->header('Content-Type' => 'application/json; charset=UTF-8');

The content-type in the header was

application/x-www-form-urlencoded
poj

In reply to Re^7: alibaba cloud sms api by poj
in thread alibaba cloud sms api by bigup401

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.