# Twitter Direct Message

**URL:** <https://discourse.nodered.org/t/twitter-direct-message/2781>\
**Category:** General\
**Created:** [2 September 2018 17:18 UTC](https://discourse.nodered.org/t/twitter-direct-message/2781 "2018-09-02T17:18:24Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![PdeJ](https://avatars.discourse-cdn.com/v4/letter/p/c89c15/32.png) [@PdeJ](https://discourse.nodered.org/u/PdeJ)\
**Post date:** [2 September 2018 17:18 UTC](https://discourse.nodered.org/t/twitter-direct-message/2781/1 "2018-09-02T17:18:24Z")

</div>

Would appreciate a walk through of how to send a direct message with the twitter node using "D {username} {message}".

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [2 September 2018 18:31 UTC](https://discourse.nodered.org/t/twitter-direct-message/2781/2 "2018-09-02T18:31:12Z")

</div>

Hi,

There isn't a huge amount to walk through. The `msg.payload` you pass to the Twitter node should be a string with the format `"D knolleary Hello Nick"` ... where `knolleary` is the user you want to send the DM to.

You must make sure the Twitter app you register to get the access tokens has permissions to access you direct messages.

Nick

---

<div class="post-metadata">

**Author:** ![PdeJ](https://avatars.discourse-cdn.com/v4/letter/p/c89c15/32.png) [@PdeJ](https://discourse.nodered.org/u/PdeJ)\
**Post date:** [5 September 2018 11:21 UTC](https://discourse.nodered.org/t/twitter-direct-message/2781/3 "2018-09-05T11:21:27Z")

</div>

Many thanks, I hadn't appreciated it was that simple, I was looking for too much complexity in the node red help. 😀

---

<div class="post-metadata">

**Author:** ![makerstorage](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/makerstorage/32/57594_2.png) [@makerstorage](https://discourse.nodered.org/u/makerstorage)\
**Post date:** [7 April 2022 07:35 UTC](https://discourse.nodered.org/t/twitter-direct-message/2781/4 "2022-04-07T07:35:51Z")

</div>

Thanks for the answer but I can not send DM to a user.  
where to do that? I mean to get access tokens that has permission?

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [7 April 2022 07:41 UTC](https://discourse.nodered.org/t/twitter-direct-message/2781/5 "2022-04-07T07:41:49Z")

</div>

You have to setup a developer account on Twitter itself

Twitter has instructions on how to do that - Google is your friend 🙂

Make sure you make a copy of all the keys and tokens it offers you, so you can then paste them into the NR Twitter configuration node

---

<div class="post-metadata">

**Author:** ![PdeJ](https://avatars.discourse-cdn.com/v4/letter/p/c89c15/32.png) [@PdeJ](https://discourse.nodered.org/u/PdeJ)\
**Post date:** [7 April 2022 10:30 UTC](https://discourse.nodered.org/t/twitter-direct-message/2781/6 "2022-04-07T10:30:14Z")

</div>

NB The user you are sending the DM to must me following you in order to receive a DM from you,
