drcrc28428 2016-12-07 05:27
浏览 46
已采纳

如何在SMSVerificationWithApplicationKey中传递特定于应用程序的自定义数据并在php后端检索它们?

I am IOS developer.

I am using SinchVerification for mobile verification in IOS application there is one security step. Pass custom data in sinchrequest after that sinch will call our server API (Verification Callback API) with server if he got valid response from our server then only it will send verification message this is for prevent misuse of our SMSVerificationApplicationKe.

Now I passed custom string but in PHP got following request so don't know how to get my passed string.

{"Host":"web.yourhost.test”,”Connection":"Keep-Alive","Accept-Encoding":"gzip","CF-IPCountry":"GB","X-Forwarded-For":"213.242.88.220","CF-RAY":"30cff02a4c2416d0-ARN","Content-Length":"816","X-Forwarded-Proto":"https","CF-Visitor":"{\"scheme\":\"https\"}","x-timestamp":"2016-12-06T13:03:28.2621119Z","Authorization":"application 737481a8-d133-4c71-9e9b-3a80656bbefd:p9rRHZZFutjmYOYDgBzWAYos6Mt4EXpUroUawSjOeBQ=","Content-Type":"application\/json; charset=utf-8","Cookie":"__cfduid=d5eaa6f6e99e7605ed74e0a40e50e50271481020280","CF-Connecting-IP":"213.242.88.220"}

And I am calling by,

  [SINVerification SMSVerificationWithApplicationKey:@"YOUR_KEY" phoneNumber:@"+919999999999" custom:@"stringTest"];
  • 写回答

1条回答 默认 最新

  • dougang7521 2016-12-07 19:22
    关注

    You need to read the body of the request that contains Json

    $data = json_decode(file_get_contents('php://input'), true);
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 metadata提取的PDF元数据,如何转换为一个Excel
  • ¥15 关于arduino编程toCharArray()函数的使用
  • ¥100 vc++混合CEF采用CLR方式编译报错
  • ¥15 coze 的插件输入飞书多维表格 app_token 后一直显示错误,如何解决?
  • ¥15 vite+vue3+plyr播放本地public文件夹下视频无法加载
  • ¥15 c#逐行读取txt文本,但是每一行里面数据之间空格数量不同
  • ¥50 如何openEuler 22.03上安装配置drbd
  • ¥20 ING91680C BLE5.3 芯片怎么实现串口收发数据
  • ¥15 无线连接树莓派,无法执行update,如何解决?(相关搜索:软件下载)
  • ¥15 Windows11, backspace, enter, space键失灵