Forum Discussion

Gursimrat's avatar
Gursimrat
Leader
12 years ago

How do I get the user who posted the latest reply in my thread using REST API

Is there any way I can get the user who posted the latest reply in my thread?    Using http://community/com-name/restapi/vc/threads/id/45, i am not getting the user who posted the latest reply fr...
  • AdamN's avatar
    12 years ago

    /threads/id/45 will give you a MessageDiscussion object. From there, you can chain the "/messages/latest" method to get a "Message" object corresponding to the latest post in the thread. And then to that, you can chain "/author" to get the details of the author for that message.

     

    So putting it all together, your call would look like:

    /threads/id/45/messages/latest/author