Twilio sms reply feature

夙愿已清 提交于 2019-12-01 20:45:38

Twilio developer evangelist here.

There's no way in SMS to reply to a specific message (try it yourself in your SMS app on your phone), so there's no ID that you can pass around secretly within conversations.

There are a few ways you can work around this.

If the user is sent only one task at a time, then you can record what their current task is and when you receive the message saying "done" tick that one off and send them the next task.

You could send them a task ID within the message, and tell them to include that ID when they respond to say they are done. You could then parse the ID out of the message and mark it as done in your database.

Or, and this might be too far, you could use a pool of numbers to send tasks out such that each live task for a user has a unique number the user responds to. Then you can look up the task based on the user and the number they replied to. Then you can free up the number for a new task.

Let me know if this helps at all.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!