When KLM twitter App(TAPP) tries to send a message to a new customer, twitter will not allow the message to be sent to the user if the user is not following KLM Twitter handle.

This validation was done based on the twitter response code.

For a long time twitter used to send 150 as the response code , when user was not following KLM twitter handle.

Although the documentation here states that 150 is still the code for the same error, Twitter is returning 349 as the error code.

Due to this reason, TAPP is unable to send/tweet messages to the customer.

Approximately 2500+ messages are not sent to the user.

This is the response from Twitter.

{“code”:349,“message”:“You cannot send messages to this user.“}

Here is the documentation we are referring to:

This looks like the same post as https://twittercommunity.com/t/unknown-api-error-code/118701 which explains that the specific user requires to be followed as well in order to receive direct messages. The error is slightly different based on user permissions but generally the same as 150 for an API DM request. The code been added to the documentation here.

1 Like

Hi,

Thanks for your response!
We are implementing a feature to send a tweet to a new twitter customer when sending the direct message fails.
Is there any other error code (similar to 150 and 349) that can also be sent in such similar scenario. We want to ensure that we cover all possible scenarios.

Thanks in advance for your support!
Nitin

Those are the two error codes you can expect to see in those scenarios.

Thanks for your response!

I have one more query:
What settings should I do in the existing profile to receive an error 349 and what do I need to get 150?
The reason we want to know is that because we are doing the testing for our feature and want to ensure how we can replicate these scenarios on different twitter profiles.

Thanks,
Nitin

There is nothing specific that will enable one error code over the other, due to technology changes on the back end, you should code for and expect either response.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.