Bob
-
Posts
2 -
Joined
Content Type
Profiles
Forums
Events
Articles
Downloads
Gallery
Posts posted by Bob
-
-
Did you resolve this issue? I have run into what I believe is the same problem.
I get the initial Access Token and Refresh token no issues, however when I attempt to renew the Access Token via the Refresh Token I am also getting, "failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request"
Trouble with refresh_token
in Support
Posted
Resolved my issues. After many hours I finally realised this was an error on my behalf.
The PHP ltrim function I was using to truncate the refresh_token from the initial callback response was dropping the first character off the refresh_token, in essence providing an invalid refresh_token. Not sure why it was doing this so used str_replace.and it's now working.
#Old code $refreshToken = ltrim($refreshToken, "refresh_token:"); #New code $refreshToken = str_replace("refresh_token:", "",$refreshToken);