FeedHive/twitter-api-client

Unable To Send Direct Message.

teezzan opened this issue · 5 comments

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

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.

Thank you very much.

It is because twitter-api-client doesn't send the correct request. I opened an issue for this: #45

Thanks. Hopefully a fix will be available soon.

Fixed in version 1.2.9