question

James Peragine avatar image
James Peragine asked ·

How can I return all messages with the same conversation ID

I am attempting to return all messages in an SMS conversation using the API and conversation ID.

This is returning not records even though I am getting the conversation ID directly from the previous API call.


My main call

https://platform.ringcentral.com/restapi/v1.0/account/~/extension/~/message-store?dateFrom=2020-02-05&dateTo=2020-07-05&direction=Inbound&distinctConversations=true&messageType=SMS&page=1&perPage=100


Returns



{
"id":
1267533910036
"to":[
...
]
"from":{
...
}
"type":
"SMS"
"creationTime":
"2020-06-26T23:56:57.000Z"
"readStatus":
"Read"
"priority":
"Normal"
"attachments":[
...
]
"direction":
"Inbound"
"availability":
"Alive"
"subject":
"For the SBA"
"messageStatus":
"Received"
"conversationId":
6271905464763260000
"conversation":{
...
}
"lastModifiedTime":
"2020-06-28T00:12:27.099Z"
}

When I then try to use the conversation ID to get all messages with this conversation ID it returns no records

https://platform.ringcentral.com/restapi/v1.0/account/~/extension/~/message-store?conversationId=6271905464763260000&dateFrom=2020-02-05&dateTo=2020-07-05&direction=Inbound&distinctConversations=true&messageType=SMS&page=1&perPage=100




What am I doing wrong?
apisms
1 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Phong Vu avatar image
Phong Vu answered ·

Don't use the "conversationId": 6271905464763260000. It is deprecated and present only for legacy purpose. Use the "id" in the "conversation" object instead.

Share
1 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

James Peragine avatar image
James Peragine answered ·

Sorry, I should have mentioned that I tried that too and is also returns zero results.


Are you saying that If I use the ID in the conversation object as an argument in the API call for Conversation ID I should return the records from that conversation? It also returns zero record results.


1 comment Share
1 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Can you remove the "direction=Inbound&distinctConversations=true" from the query?

0 Likes 0 · ·
James Peragine avatar image
James Peragine answered ·

That also returns no records

1 comment Share
1 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

It works normally for me so I am not sure how what is going on with your code or account. You can create a ticket at devsupport@ringcentral.com so they can have a deeper look at your problem.

0 Likes 0 · ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.