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 springboot+vue 集成keycloak sso到阿里云
  • ¥15 win7系统进入桌面过一秒后突然黑屏
  • ¥15 有一台三相异步电动机 M1控制一个小车,有四个控制按钮,一个复位、一个启动、一个停止,还有一个急停,两个行程开关分别为上限位和下限位。 上限位。 下限位。
  • ¥30 backtrader对于期货交易的现金和资产计算的问题
  • ¥15 求C# .net4.8小报表工具
  • ¥15 安装虚拟机时出现问题
  • ¥15 Selenium+docker Chrome不能运行
  • ¥15 mac电脑,安装charles后无法正常抓包
  • ¥18 visio打开文件一直显示文件未找到
  • ¥15 请教一下,openwrt如何让同一usb储存设备拔插后设备符号不变?