Error Message: invalid_grant

The invalid_grant error would come up if Xero is not liking the credentials being used to connect. The most likely explanation is that the token used has expired. The access token to Xero needs to get refreshed every 24 hours. This is usually performed in the background via Magento's cronjob.

The following should get the connection re-established. Please update our extension to the latest version by running

	bin/magento deploy:mode:set developer (if in production mode)
	composer update fooman/* xeroapi/*
	bin/magento setup:upgrade
	your usual sequence of commands to enable production mode (if started in production mode)
	for example bin/magento deploy:mode:set production

Then head to the Magento admin and click the button
Refresh Xero Token
under Stores > Configuration > Fooman > Xero OAuthv2.0.

This should redirect you to Xero, please click continue until you are back in Magento. You should then see the connection status as connected. 

Lastly please check the cronjob for Magento is running regularly.

Still need help? Contact Us Contact Us