0

Is it possible to send a direct message with Twitter api and make the app name appear as sender?

I can send the direct message using the "Access token" and "Access token secret" that is in the "OAuth tool", but these messages are sent from my own Twitter account (the one that I used to create the app).

Jorge
  • 831
  • 13
  • 18

1 Answers1

0

No, Twitter's documentation for new direct messages here says that the api:

Sends a new direct message to the specified user from the authenticating user

so the app must send the direct message from a user and not from the app (the info box on the right of the docs says "requires user context").

The only way to make your app appear as sender would be to create a Twitter account with the app name but the user that receives this message would have to follow your app first to be able to receive the message.

Green
  • 111
  • 5
  • And is it possible to send and receive the message from the user itself having this user accepted the app? – Jorge Aug 13 '13 at 12:15
  • Are you referring to the user sending itself messages or receiving/sending messages from other users? – Green Aug 13 '13 at 12:58
  • I mean if we can use the account of the user to send him a direct message although he will be the "sender" and "receiver". I suppose that if he has accepted the app and is logged in, we can. Isn't it? – Jorge Aug 14 '13 at 22:11
  • Yes you can send the user a DM from itself – Green Aug 15 '13 at 07:23