-
Notifications
You must be signed in to change notification settings - Fork 800
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Could not authenticate you in DM #257
Comments
You need to encode your data to post in json like this : But adding optionnal header generates a bug, I fix it in this PR : #266 |
@sadlig |
was getting "Could not authenticate you" issue too when posting tweets with images; however, posting tweet alone worked, and posting images alone worked too at the end have found out that problem was with media_id had such fragment of code: $post_results_decoded = json_decode($post_results, true);
$media_id = $post_results_decoded['media_id']; if getting media_id this way, it came as a float number, and got rounded; the error message was related to the issue that twitter cannot find if i have right to post media with this rounded media_id than i have changed the fragment above to: $post_results_decoded = json_decode($post_results, true, 512, JSON_BIGINT_AS_STRING);
$media_id = $post_results_decoded['media_id']; and it works now hopefully, this helps someone... |
@vishnu1991 Were you able to solve the problem? |
Error: 32 Could not authenticate you.
To Send Direct messages using "POST direct_messages/events/new (message_create)"
Ref: https://developer.twitter.com/en/docs/direct-messages/sending-and-receiving/api-reference/new-event
P.S : Sending Direct message using "POST direct_messages/new" works fine but "POST direct_messages/events/new (message_create)" throws error
The text was updated successfully, but these errors were encountered: