Friday 1 December 2017

Access token error: timestamp_refused in linked oauth2.0

I have done linkedin oauth api in my local. API response from linkedin is working fine in localhost. When I've moved to server, i got error in linkedin api on the server like as follows.

oauth_problem=timestamp_refused&oauth_acceptable_timestamps=1349951029%2B-300

Solved:

FIRST SEE WHAT IS THE TIME DIFFERENCE BETWEEN THE WEB SERVER AND THE LINKED IN SERVER


In OAuth.php file there is a function [generate_timestamp] which is returning a time(). By changing it to

#to avoid the error of
#oauth_problem=timestamp_refused&oauth_acceptable_timestamps=#return time()+(difference of mints*sec);return time()+(40*60);

No comments:

Post a Comment

cURL error 60: SSL certificate problem: unable to get local issuer certificate (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) in Laravel

  WampServer: Download this file:  http://curl.haxx.se/ca/cacert.pem Place this file in the  C:\wamp64\bin\php\php7.1.9  folder Open  php.in...

Popular Articles