Support request on Application-user Authentication flow

nodejs
oauth
direct-messages
error-32

#1

Hi,

actually i’m implementing Twitter APIs either with Application-only and Application-user Authentication.

On Application-only auth, i’ve successfully done without particular problems, but i’ve encountered various problem with Application-user authentication.

In my case, after the user allow application on https://twitter.com/oauth/authorize?oauth_token=xxxxxxxx , Twitter trigger my callback url http://127.0.0.1:3000/oauth/twitter/retrieve-credentials and i’ve obtain:

  • accessToken

  • accessTokenSecret

  • logged user profile

So, at this point, if try to send a direct message with POST request on direct_messages/events/new.json , Twitter always return the same response:

{ code: 32, message: ‘Could not authenticate you.’ }

I’m working on Node, with oauth module for OAuth Authentication (https://www.npmjs.com/package/oauth) and twitter module (https://www.npmjs.com/package/twitter) for Twitter REST and Streaming API’s.

My goal is to successfully send direct_message.

Please, someone can help me figure out? I’ve spent a entire week to try to accompish this specific tasks :sob:

Regards,

Simone