cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Surveyor II

Issue with Conversations API

Jump to solution

Hello all,

I was playing around with sending/reading messages using the Conversations API and I've run into a little issue.

Say for example we have user A and user B. If user A sends a message to user B, then I can run the GET v1/conversations/ request on user B and the message from user A shows up in the response. However, if I run the same request on user A after the message is sent, that sent message does not show up in the response.

Now, lets say user B responds to the message sent by user A. Then if I run the GET request on user A, the message shows up in the response. I would like to see that sent message regardless of whether the recipient replies to it or not, but it seems like the API doesn't support this.

Am I missing something or is this intended functionality? Any help will be appreciated, thanks!

 

 

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Lamplighter II

I just popped the network tab open in Canvas and switched to my sent list. It adds a `sent` scope to the GET request. Maybe it's an undocumented filter you could use?

GET /api/v1/conversations?scope=sent&...

View solution in original post

4 Replies
Highlighted
Lamplighter II

The `conversations endpoint only returns messages for the current user:

Returns the paginated list of conversations for the current user, most recent ones first.

If you want all messages, get the thread ID for the current user and then use a GET on the specific conversation to get the entire thread.

0 Kudos
Highlighted

Hi @bbennett2 , 

I should have been a little more clear in my question - I'm trying to create an "Inbox" page using the API and have a tab for "Sent" messages. I could get the id of the message from the query response once the user sends a message from the page, but what if the user sends a message from the web version? I wouldn't be able to get the id of that message thread because it wasn't sent through my integration and also wont show up in the GET v1/conversations.

(And even if I could get the message IDs all the time, individually querying for each message just to make a "Sent messages" list might take quite a while depending on how many messages the user has sent but not received a response to).

Is there a different way to approach this or am I misunderstanding your reply? Thanks!

0 Kudos
Highlighted
Lamplighter II

I just popped the network tab open in Canvas and switched to my sent list. It adds a `sent` scope to the GET request. Maybe it's an undocumented filter you could use?

GET /api/v1/conversations?scope=sent&...

View solution in original post

Highlighted

@bbennett2 That does the trick, thanks so much! Don't know why it isn't documented, and should've thought of Dev Tools network tab, good find. Again, thanks!

0 Kudos
Top Kudoed Authors
Labels