@MikeyB a tad late but guaranteed, If you're getting the invalid grant error mainly because of the exact purpose like me Then you definitely address it by resetting the secret vital from the google console and go with the token generation movement again with the new secret essential, but remember https://diigo.com/010ng6t