I am trying to run the ruby quickstart outlined here but when I run ruby quickstart.rb I get the error:
gems/googleauth-0.5.1/lib/googleauth/user_authorizer.rb:135:in `get_credentials': Token client ID of CLIENT_ID does not match configured client id CLIENT_ID (RuntimeError)
from quickstart.rb:28:in `authorize'
from quickstart.rb:45:in `<main>'
I have checked and made sure I followed the instructions and that the credentials listed in my developer console match those in the client_secret.json file.
Any thoughts about what the issue or a solution might be?
I had this happen to me as well. I think it was because I had a ~/.credentials directory left over from some time when I tried the quickstart in the past (I am guessing with a different account). Deleting the directory fixed the problem for me.
jcouball is right -- that error means you had a preexisting token in the file pointed to by CREDENTIALS_PATH that was created with a different client ID.
I realize this is > 1 year ago. The answer remains as valid as ever :) When you delete the credentials file, you'll be prompted to validate and you'll be all set 馃槃
Delete token.yaml file
Delete token.yaml file
That's it for me, thanks bongchoung!
Most helpful comment
I had this happen to me as well. I think it was because I had a
~/.credentialsdirectory left over from some time when I tried the quickstart in the past (I am guessing with a different account). Deleting the directory fixed the problem for me.