Xero - beautiful accounting software

Xero Developer Help Center

Xero Developer Community

Community > API Authentication >

Help with refreshing expired access token in OAuth 2.0

Started by Dhaneshwar singh -   in API Authentication

Hello

I am unable to refresh the expired access token because i am getting {'error' : 'invalid_grant'} error".
I am using PHP requests library and OAuth 2.0.
while the refresh token is valid for 60 days still I am unable to refresh the access token

This is the code I am using to refresh the token:

$refresToken = array('refresh_token' => $this->getRefreshToken($id));

$newAccessToken = $this->provider->getAccessToken('refresh_token',$refresToken)
Any Update on this as I'm still suffering with the issue.
 

Dhaneshwar singh