Twitter updated their messages API (https://developer.twitter.com/en/docs/direct-messages/sending-and-receiving/api-reference/new-event) today and all of the Python code I had written via Tweepy relating to sending Direct Messages has stopped working and I can't seem to get it to work. This is the code I have right now:
direct_message = api.send_direct_message(user=username, text=message_text)
However, I am getting the following error response from Twitter:
[{'code': 34, 'message': 'Sorry, that page does not exist.'}]
I am confused about how to implement the new API changes with Tweepy. It was working perfectly fine until today and now it won't work... I am 100% sure the user is authenticated and has the permissions to send messages and I am still getting the error.