Interactive messaging button issue - help me


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

Hi @uselessdog,

Thanks for your feedback,

Here is some documentation you might find helpful…

You will want to return the response of the API call to obtain the post id. If you are using curl, there is likely a function in your language that supports curl calls and can return a response from the API. The post_id will be one of the fields in json response that comes after calling the API. I would be willing to answer more if you can give me specifics about the stack you’re using.