Solution of Twitter API error- 401 error, timestamp out of bounds


Quick summary

To fix Twitter API error 401, sync the server timestamp with Twitter’s using PHP. Follow the steps outlined in the reference site. Make adjustments to the Wordtwit settings. It’s a straightforward process!

Reference site of solution : Follow This steps, 1.. Create a php file in your server:

request_url =""; 
$srvstamp = time(); // ---- server timestamp ---- 
$twheader = get_headers($request_url, 1); // ---- array with ['Date'] string 
$twistamp = strtotime($twheader['date']); // ---- twitter timestamp 
echo " Server: ".date("Y.m.d (H:i:s)",$srvstamp)." - ".$srvstamp." \r\n"; 
echo " Twitter: ".date("Y.m.d (H:i:s)",$twistamp)." - ".$twistamp." \r\n"; 
/The diference between my server and twitter is/ echo $twistamp - $srvstamp; ?>

2.- Open your browser and go to your php file I copied the difference between the timestamps
4.- Go to Ajust ->Wordtwit and saste that number in the last text filed (timestamp)
5.- Save and that’s all

Date: September 10, 2014

Leave a reply

Your email address will not be published. Required fields are marked *