FeedHive / twitter-api-client

A user-friendly Node.js / JavaScript client library for interacting with the Twitter API.
MIT License
948 stars 84 forks source link

Unable To Send Direct Message. #37

Closed teezzan closed 3 years ago

teezzan commented 4 years ago

Thanks for your awesome work.

I have been unable to send direct messages while following the reference document.

Whenever I run

let parameters ={id:"1322838158258720769", data:"helloworld"}
twitterClient.directMessages.directMessagesEventsNewMessageCreate(parameters)
.catch(err => { console.log(err) })

the library keeps returning { statusCode: 415, data: '' }.

What am I doing wrong?

My current version is "twitter-api-client": "^1.2.0"

Thank You Very Much

SimonHoiberg commented 4 years ago

Hi, @teezzan. Thanks for creating this issue.

Your code looks correct, so it's likely to be a bug. I'll look into this asap.

teezzan commented 4 years ago

Thank you very much.

lcswillems commented 3 years ago

It is because twitter-api-client doesn't send the correct request. I opened an issue for this: https://github.com/FeedHive/twitter-api-client/issues/45

teezzan commented 3 years ago

Thanks. Hopefully a fix will be available soon.

SimonHoiberg commented 3 years ago

Fixed in version 1.2.9