Created
November 30, 2018 19:21
-
-
Save robinsloan/2b3426085e006f30da78c68388f3185e to your computer and use it in GitHub Desktop.
Twitter DM autoresponder
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# First, | |
twurl authorize --consumer-key YOUR_CONSUMER_KEY --consumer-secret YOUR_CONSUMER_SECRET | |
# Then, | |
twurl -A 'Content-type: application/json' -X POST /1.1/direct_messages/welcome_messages/new.json -d '{"welcome_message": {"name": "autoresponder", "message_data": {"text": "Hi! I am not currently checking DMs. You can email me instead 👉 YOUR EMAIL HERE"}}}' | |
# In the response, note the id of the returned welcome message object, because you'll need it in a moment. | |
# Finally, | |
twurl -A 'Content-type: application/json' -X POST /1.1/direct_messages/welcome_messages/rules/new.json -d '{"welcome_message_rule": {"welcome_message_id": "RETURNED_WELCOME_MESSAGE_OBJECT_ID"}}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment