node-twitter
node-twitter copied to clipboard
"Could not authenticate you." Direct Message Twitter
Hi, i'm trying to send direct message and i have this error : {"code":32,"message":"Could not authenticate you."}
here it is my code :
client.post('direct_messages/events/new', {
type: 'message_create',
message_create: {
target: {
recipient_id: "4...",
message_data: {
text: "hi"
}
}
}
})
I have surely activated the access level for enabling Direct Messages but still ....
Was there a ! character anywhere in the payload? We fixed that problem in twitter-lite and now DMs can send any characters.
Same problem. but your message_data should be moved up a level, same level as target.
I switched to https://www.npmjs.com/package/twit and it worked like a charm. The switch took about 45 seconds lol. Probably a header issue but ¯_(ツ)_/¯
I also switched. I think this repo is dead.
Repo is dead, thanks.