Interactive messaging button issue - help me


#1

Hi

i am looking for how interactive button pass post id of a posts what have a interactive button.

  1. i call ‘/post’ api to post a message with props
    var props = {
    “attachments”: [
    {
    “text”: “Click button to change this posts!”,
    “actions”: [
    {
    “name”: “Click me”,
    “integration”: {
    “url”: “http://localhost:3000/change_post”,
    “context”: {
    “new_text”: “message updated!”,
    “post_id”: ??? <- how to get original posts id ???
    }
    }
    }
    ]
    }
    ]
    }

  2. interactive button is shown on a posts.

  3. click the button

  4. url “localhost:3000/change_post” is called

  5. “localhost:3000/change_post code” source is
    url address: server host + /posts/{post_id}
    {
    “is_pinned”: true,
    “message”: req.body.context.new_text, <- new message
    “file_ids”: [ ],
    “has_reactions”: true,
    “props”: “string”
    }

but how to get original post_id ???

i have no idea to do that

please let me know how to do or give me some advices.

thank you in advance


#2

Hi @uselessdog,

Thanks for your feedback,

Here is some documentation you might find helpful…