question

James Peragine avatar image
James Peragine asked Phong Vu commented

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?
rest apisms and text messaging
1 |3000

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.

1 |3000

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 Phong Vu commented

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
1 |3000

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 ♦♦ commented ·

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

0 Likes 0 ·
James Peragine avatar image
James Peragine answered Phong Vu commented

That also returns no records

1 comment
1 |3000

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 ♦♦ commented ·

It works normally for me so I am not sure how what is going on with your code or account. You can create a support ticket so the developer support team can have a deeper look at your problem.

0 Likes 0 ·

Developer sandbox tools

Using the RingCentral Phone for Desktop, you can dial or receive test calls, send and receive test SMS or Fax messages in your sandbox environment.

Download RingCentral Phone for Desktop:

Tip: switch to the "sandbox mode" before logging in the app:

  • On MacOS: press "fn + command + f2" keys
  • On Windows: press "Ctrl + F2" keys