使用Java SDK更改SMS读取状态

问题描述

当我们发送任何SMS时,我们都可以在响应中获取SMS消息的ID,我注意到响应中的状态始终是已读,是:>

"readStatus":"Read"

我不确定为什么读取认值,这是什么意思?

如果我需要将状态更改为未读或未读,怎么办?

在这里仔细阅读了Java SDK文档和示例:

https://github.com/ringcentral/ringcentral-java

但是还没有找到一种方法来完成它。

可以用java SDK进行更改吗?

解决方法

基本上有2种状态:Read,Unread
发送SMS时,readStatus始终为“ Read

您可以使用消息存储区API更新消息的状态。
在此处检查此API:

https://developers.ringcentral.com/api-reference/Message-Store/updateMessage

每条SMS消息都有一个messageId,您需要使用该messageId来更新readStatus。
例如:
放入https://platform.devtest.ringcentral.com/restapi/v1.0/account/~/extension/~/message-store/

您可以使用此API更改状态。同样使用SDK,您可以更改它。
在Java中查看演示:
https://ringcentral-tutorials.github.io/sms-api-java-demo/?distinctId=1746f43bd51496-0f9334d92b97c8-f7b1332-144000-1746f43bd523ca#5