Laravel Issue

Hi, i got TokenExpiredException:


my query:

PS: the token is not expired, im using Laravel latest version

If the token expired it’s due to one of two things. Either 24 hours has passed without being refreshed, or it has been refreshed but the new token was not captured.

In the case of the first, you can just use the refresh token to get a new set.

In the second case, you will need to have the user go through the three legged process of re-authorizing the app.

the tokens are good i have tested same tokens without laravel and working fine, i think im missing something with this code:

           $db = DataBase::find(1);
            $tokenObj = $db->full;
// $tokenObj from db is saved e.g s:165:"{"access_token":"k6cse9psdfdf5erergdfgf","token_type":"bearer","expires_in":86400,"refresh_token":"dfsr445fsdffgdfgrgdfsrfsf","scope":"full|[ap199.infusionsoft.com](http://ap199.infusionsoft.com/?fbclid=IwAR3466Gf-Ns0coNzDaj4Jj3td9dDhCtQAvfri5X2Ke-kN7fw4Uorac1JxSw)"}";
            $tokenObj = unserialize($tokenObj);

i think i figured out, initially when app is authenticated with allow/deny screen following token is generate with exchange of CODE:

NO: 1

O:18:"Infusionsoft\Token":4:{s:11:"accessToken";s:24:"zffgrereedfgdfrtsdfrttcfj";s:12:"refreshToken";s:24:"ertersdfgdfgdfg";s:9:"endOfLife";i:1561842748;s:9:"extraInfo";a:2:{s:10:"token_type";s:6:"bearer";s:5:"scope";s:27:"full|pq199.infusionsoft.com";}}

when the token is refreshed with cURL using POST method following token is generated:

NO:2

s:165:"{"access_token":"k6cse9pertretert5umfst5u","token_type":"bearer","expires_in":86400,"refresh_token":"zr2vxgfdgdfgdfgafmgyz2typ","scope":"full|ap199.infusionsoft.com"}";

This token do not have “extraInfo”

in normal PHP SDK the NO2 token is accepted without any error but in Laravel this code needs to be formatted to NO1