Could not authenticate you




I have Twitter API setup for a local application in C# (using Tweetinvi). Everything is in place and working.

However -
for a small amount of messages per week, I get a response of Code 32 - “could not authenticate you” - I have not changed the credentials or anything as follow up messages that enter the queue go through just fine. When I try and re-send the one in question it comes back with the same response.

So, I do not see this as an authorisation/authentication issue – It is either
a) API issue, or
b) Tweetinvi (C# Library) issue (which I will report on their site if it looks like the target)

Because we need these messages added to our Twitter channel, we end up logging in directly to the site and pasting the message/tweet. This works fine. Why does it not work through the API?

Are there any types of characters that are invalid through the API? I have tried removing some characters in the original message and re-sending it hoping to find some clue of where the problems is. Sometimes the message still comes back with the same response. Other times, after removing a certain character(s) - it eventually is sent successfully.

For example, in one message, removing the ‘£’ characters solved the problem. For another, it was removing a ‘[’ near the end of the message. For another, it was removing the ‘[2 of 2]’ at the beginning of the message. These are completely random.

All messages are under 140 characters (I believe the ‘Status over 140 characters’ response would be returned if the case, before the problem explained above, anyway)

I hope I have explained my problem.

Here is an example tweet (without the double-quotes) -
"[3 of 3] concessions £37 SW99 9XX"

This is the url of the message -[3%20of%203]%20concessions%20£37%20SW99%209XX

It would be good to hear from others on this subject - and if a tweet above worked fine for them.


There’s a chance that something is wrong with the encoding of the Tweet status updates - that’s the kind of error I might expect to see if that was the case.


Hi Andy,

Thank you for the reply. I am not sure if any tweetinvi devs are part of this forums but I will check their site and see if there is a potential bug here.

Thank you.


I have created a bug on tweetinvi. I will update this page when more news comes across.


Investigating further - it appears the problem is based on messages that contain a ‘£’ as well as ‘[’ and/or ‘]’ and it does not matter where abouts in the message they are.

When I test the same message but removing the squared brackets, it works.
When I test the same message but removing the pound (£) character - it works.

I have tested this on small as well as large messages.

I believe this is a tweetinvi issue, but please (if anyone is using different) to test the above example and see if it works for you - whatever API/tool you are using. To temporarily fix this issue, I have replaced ‘[’ with ‘(’ and ‘]’ with ‘)’ – and so far, messages I have tested are now working.

I have updated this info on the tweetinvi github (bug) page as well.