Forum Discussion

david-mcgurrin's avatar
6 years ago

Link to forum post using message_id

Hey Parshant - just following up on the question I asked here. Getting the "board_id" and "message_id" works great, however I'm still having a bit of trouble actually linking back to the forum post ...
  • Parshant's avatar
    6 years ago

    david-mcgurrin,

    You can get the message information using V1 and V2 API using that "message_id".

     

    <#assign msgId = rest("/boards/id/${board_id}/messages/id/${message_id}/id").value/>

    and pass this msgId to V2 API.

    SELECT id, view_href, topic.id, topic.view_href, board.id, board.view_href FROM messages WHERE id = '${msgId}'

    This will fetch all the information that message, forum post, board anything you would like. You can also add new fields to the API to get more info. topic.id is the main message id if its reply, and if the message is topic then it will be the same for that id.

    Here is the doc for API v2 messages.