Can we get a listing of all the errors and what they mean? Barring that, can we get an official wiki where we can document these types of things? I'm trying out a oauth client and the response I'm getting is 'Timestamp is invalid'. It would be nice if I could get a listing of what makes a time stamp invalid so I'd know where to look (beyond timestamps).
UPDATE: I was using a plain DateTime.Now.. when i should have been using UTC
-- stolen from the oAuthBase.cs --
public virtual long 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);
}
Can we get a listing of all the errors and what they mean? Barring that, can we get an official wiki where we can document these types of things? I'm trying out a oauth client and the response I'm getting is 'Timestamp is invalid'. It would be nice if I could get a listing of what makes a time stamp invalid so I'd know where to look (beyond timestamps).
-Mark
Tags
Jeremy – 3 years ago
the clock on your server is too different from the clock on the api server. I had this issue as well...
Michael Hart – 3 years ago
Errors are listed in the beginning of the REST API Reference.
Tip: you can use the HTTP header timestamps in the API requests to sync your application's clock, if necessary.
Mark Roddy – 3 years ago
The time on the machine I'm running on was almost a half an hour behind, I never even noticed. Thanks for the help Michael.
Evildonald – 3 years ago
I got this issue as well.. i'm about 4000 seconds out.. is that becuase i'm programming from London and am hours ahead?
NETFLIX: There needs to be a web service to see what the server thinks the time is.. we're just guessing otherwise.
Evildonald – 3 years ago
UPDATE: I was using a plain DateTime.Now.. when i should have been using UTC
-- stolen from the oAuthBase.cs --
public virtual long 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);
}
buff88 – 3 years ago
Which timezone is this based off of?
Michael Hart – 3 years ago
I believe UTC is Greenwich. Wikipedia is sure to know.
Kirsten Jones – 2 years ago
You can get a timestamp from our system by calling http://api.netflix.com/oauth/clock/time?consumer_key=KEY to ensure that your timestamp will match.