I had OAuth2 working in offline mode for 201209 (thanks to Danial's help
months ago); however, I am moving to the 201302 version. The new version
has a different format for the generated hash. When I store the hash and
then try to run use_oauth2.rb again, I receive the following error:
use_oauth2.rb:61: syntax error, unexpected tINTEGER, expecting '}'
...RPo", :issued_at=>2013-05-07 22:46:30 -0600, :expires_in=>36...
... ^
use_oauth2.rb:61: syntax error, unexpected ',', expecting keyword_end
..._at=>2013-05-07 22:46:30 -0600, :expires_in=>3600, :id_token...
...
The token is stored exactly as it is sent and I have seen several threads
about making sure that it stays the same. Any ideas why this is error'ing
out?
To test this, I am using the following in use_oath2.rb ->
token = {:access_token=>"ya29.AXXX", :refresh_token=>"1/Bp_XXX",
:issued_at=>2013-05-07 22:46:30 -0600, :expires_in=>3600, :id_token=>nil}
adwords.authorize({:oauth2_token => token})
The first time I capture the token using the following works fine. I am
verifying the token is identical after running this by just doing a simple
"puts token" after this line. They look the same. This is driving me crazy.
token = adwords.authorize({:oauth2_verification_code => "4/yRNXXX"})
This needs to be done in offline mode. I started with JWT but because I
use an MCC to access multiple client accounts, this apparently does not
work. I moved over to straight offline OAuth2 installed app and in theory
this should work.
Any advice would be appreciated.
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.