Hi
i am looking for how interactive button pass post id of a posts what have a interactive button.
-
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 ???
}
}
}
]
}
]
} -
interactive button is shown on a posts.
-
click the button
-
url “localhost:3000/change_post” is called
-
“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