Sudden not authorized error


I created an application in C# for retrieving mentions from my own account following the single-user oAuth documentation. This has been working great for more than a year now. However recently it started returning not authorized errors for no reason I can see. I tried creating a new application on my account with permission to read, write and direct messages and generated new access tokens, but the problem persists. I left it a couple of days then checked the permissions and tokens to make sure twitter had updated my settings properly but it made no difference. I create the following url in my application to post using the WebRequest method in C#(Keys are fake of course).

Can anyone tell me if I am missing anything from the url, or whether anything has changed in the twitter API regarding authorization or mentions. I am pulling my hair out trying to figure out what’s wrong, any help will be appreciated.


Did the timing of this stopping working correlate at all with the daylight savings time change? Make sure you’re generating timestamps in UTC and that they are correct irrespective of the DST.


This is the function I use to create timestamps.

public virtual string GenerateTimeStamp() { // Default implementation of UNIX time of the current UTC time TimeSpan ts = DateTime.UtcNow - new DateTime(1970, 1, 1, 0, 0, 0,0); return Convert.ToInt64(ts.TotalSeconds).ToString(); } This appears to already generate the timestamp in UTC.


Can you verify that the resultant number is accurate?
(It’s currently “Mon Mar 19 08:06:50 -0700 2012”, which is “1332169610” in epoch time)

Once you’ve ruled this out, move on to some other investigations you can make: [node:204].