Google API SDK OAuth2 Authentication “Invalid_Grant”
The solution is as simple as checking the time is synchronized to match what Google has. If your server has a time that is even 1 minute in the future off, Google will send an exception of “Invalid_Grant” due to a request claiming to come from the future.
Try disabling Just My Code (JMC).
- Tools -> Options -> Debugger
- Uncheck "Enable Just my Code"
By default the debugger tries to restrict the view of the world to code that is only contained within your solution. This is really heplful at times but when you want to debug code which is not in your solution (as is your situation) you need to disable JMC in order to see it. Otherwise the code will be treated as external and largely hidden from your view.
When you're broken in your code try the following.
- Debug -> Windows -> Modules
- Find the DLL for the project you are interested in
- Right Click -> Load Symbols -> Select the Path to the .PDB for your other project