SMS 60200 无效参数错误 (400 错误请求)

huangapple go评论68阅读模式
英文:

SMS 60200 Invalid parameter error (400 bad request)

问题

I'm trying to implement SMS authorization using PHP (Laravel).

I send all the data according to the documentation, but I get a parameter error.

In theory, everything should work correctly. This is the data that goes into the request:

array:2 [ // vendor/twilio/sdk/src/Twilio/Version.php:211
  "To" => "+380983435443"
  "Channel" => "sms"
]

Documentation: Twilio Error 60200

英文:

I'm trying to implement SMS authorization using PHP (Laravel).

I send all the data according to the documentation, but I get a parameter error.

In theory, everything should work correctly. This is the date that goes into the request:

array:2 [ // vendor/twilio/sdk/src/Twilio/Version.php:211
  "To" => "+380983435443"
  "Channel" => "sms"
]

Documentation https://www.twilio.com/docs/api/errors/60200

答案1

得分: 0

根据文档显示,您收到了错误代码60200,这是一个无效的参数...

根据文档,代码应该如下所示

$twilio->messages
      ->create("+15558675310", // to
               ["body" => "Hi there","from" => "+15017122661"]
      );

但在这里,看起来您已经将To和Channel作为参数发送了...

提供您创建消息的代码片段将更有帮助。

英文:

This is a very vague question lot of things needed to be known to understand your issue...

from what I can see in the documentation you have received an error code of 60200 which is an invalid parameter...

according to documentation, the code should look like this

$twilio->messages
              ->create("+15558675310", // to
                       ["body" => "Hi there","from" => "+15017122661"]
              );

but here it looks like you have sent To and Channel as parameters..

Providing a snippet of your code where you have created the message would be more helpful.

huangapple
  • 本文由 发表于 2023年3月9日 20:09:09
  • 转载请务必保留本文链接:https://go.coder-hub.com/75684417.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定