0
votes

I was having a problem with attachments using the chat.postMessage API. Working backwards, I tried using the Tester to send something with an attachment. But even using the tester, I'm not getting anything. Now I'm stumped.

Using the Tester with chat.postMessage, I'm including the following fields:

token: ... channel: #general text: test attachments: [{title: '2nd test'}]

But all I'm getting in Slack is "test" with no attachment.

1

1 Answers

4
votes

Solved it. For anyone with the same problem: Need quotes around the keys in the attachments. I always forget that when building json that gets sent as form-data.