Ito Yoshiaki
Ito Yoshiaki

Reputation: 49

Slack API - create a post using curl

we can post messages by using slack api. how can I "create a post" through slack api on curl command interface?

ref: third item "create a post" http://gyazo.com/fc00f2ba2af66b4d6843e89a24c33be3

I've tried some request as follows.

curl -F file=@post_contents.txt -F channels=sample -F token=SOME_SLACK_TOKEN -F filetype=posts -F title=some_title https://slack.com/api/files.upload

I want not to create a text file but to create a post. best

Upvotes: 4

Views: 3966

Answers (1)

Talus
Talus

Reputation: 754

Rather than posts as your filetype, use post

Upvotes: 5

Related Questions