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

how Pass Application-specific custom data in SMSVerificationWithApplicationKey and retrive them in php backend?

我是 IOS 开发者。

我在 IOS 应用程序中使用 SinchVerification 进行移动验证,有一个安全步骤。在 sinchrequest 中传递自定义数据,之后 sinch 将调用我们的服务器 API(验证回调 API),如果他从我们的服务器得到有效响应,那么它只会发送验证消息,这是为了防止滥用我们的SMSVerificationApplicationKe

现在我传递了自定义字符串,但在 PHP 中收到了以下请求,所以不知道如何获取传递的字符串。

{"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"}

我打电话给

  [SINVerification SMSVerificationWithApplicationKey:@"YOUR_KEY" phoneNumber:@"+919999999999" custom:@"stringTest"];

您需要阅读包含 Json

的请求正文
$data = json_decode(file_get_contents('php://input'), true);