完全披露我在Till Mobile工作。
我相信你可以使用我们的A2P短信平台和一个号码来实现这一点。
直到发送出站邮件时,才为来电号码组合创建唯一的ID。
当收到入站消息时,它将被标记为具有相同的唯一ID。在Till API中,此ID称为project_launch_guid。
使用直到API
你可以得到一个免费的用户名并通过https://tillmobile.com/
API_KEY发送出站消息
curl -H "Content-Type: application/json" -X POST -d '{
"phone": ["phone_number"],
"questions" : [{
"text": "Server is on fire. Please respond with guidance!",
"webhook": "http://requestb.in/1ilpbfd1"
}]
}' "https://platform.tillmobile.com/api/send?username=username&api_key=api_key"
它返回
{
"project_launch_guid": "some_guid",
...
}
每次发送都像对话一样对待。他们无限期地坚持下去,除非另一个发送与电话号码相同。在这种情况下,第二次发送排队在第一个后面,如果未收到响应,则会为第一个设置可配置的TTL(默认为1小时),在这种情况下,我们将下一条消息从队列中弹出并立即交付
检索入站消息
如果用户稍后响应消息将被POST'd到这种格式包括该上文所定义的网络挂接project_launch_guid从发送返回:
{
"project_launch_guid": "some_guid",
"participant_guid": "585897f2-2c30-43f5-8f6b-7c243e8ac4b0",
"participant_phone_number": "phone_number",
"question_guid": "685897f2-2c30-43f5-8f6b-7c243e8ac4b0",
"question_text": "Server is on fire. Please respond with guidance!",
"result_guid": "885897f2-2c30-43f5-8f6b-7c243e8ac4b0",
"result_timestamp": "2016-11-27T11:57:14.060474",
"result_answer": "Find the fire extinguisher stat",
...
}
注: Ť他的webhook是可选的。如果没有提供它的入站消息可以通过我们的结果API检索:
curl "https://platform.tillmobile.com/api/results?username=username&api_key=api_key&project_launch_guid=some_guid"
无论使用网络挂接或结果API的project_launch_guid可用于扎出站和入站消息一起。 result_answer属性值将包含用户的入站消息。
我们可以在这里https://till.readme.io/docs/
更多的文档不要犹豫,让我知道我们如何能够进一步帮助。