Regarding the following REST request:
POST https://api.twitter.com/1.1/direct_messages/new.json
I would like to provide an “actionable” error message back to users.
How does one differentiate between: Rate Limiting VS Permission/Blocking
Here are the 2 errors I am seeing frequently:
[Error 1]
HTTP/1.1 403 Forbidden
{“errors”:[{“code”:349,“message”:“You cannot send messages to this user.”}]}
[Error 2]
HTTP/1.1 403 Forbidden
{“errors”:[{“code”:151,“message”:“There was an error sending your message: You can’t send direct messages to this user right now.”}]}
How should I interpret these?
Guessing here:
Error 1 - Sounds like Permission?
Error 2 - The words “right now” alludes to Rate Limiting?