Hi,

As a starting point, could you try running the OAuth2 JWT 
sample<https://github.com/googleads/google-api-ads-ruby/blob/master/adwords_api/examples/v201309/misc/use_oauth2_jwt.rb>after
 adding your key_filename at line 
37<https://github.com/googleads/google-api-ads-ruby/blob/master/adwords_api/examples/v201309/misc/use_oauth2_jwt.rb#L37>?
 
 If that works then we can backtrack and figure out what's missing or 
incorrect in your sample.

Thanks,
Josh, AdWords API Team

On Friday, December 27, 2013 10:27:00 AM UTC-5, Blake Howe wrote:
>
> Hi guys, This has driven me nuts. I am using the ruby API connecting  with 
> JWT, and getting an invalid_grant error.  Here is my connection string.
>
>   adwords = AdwordsApi::Api.new({
>   :service => {
>     :environment => :PRODUCTION
>   },
>   :authentication => {
>     :method => 'OAUTH2_JWT',
>     :oauth2_issuer => 'xxxxxxxxx', <---- client ID for the r12
>     :oauth2_prn => 'xxxxxxxx', <----- email address
>     :oauth2_access_type => 'offline',
>     :oauth2_secret => 'notasecret',
>     :oauth2_keyfile => key_file, <---- correct path for key file
>     :developer_token=> 'xxxxxxx', 
>     :client_customer_id => 'xxxxx'   <----  is correct.
>   }
> }) 
>
> Using a similar scheme for the analytics api without issues. Let me know 
> any thoughts, or something I could be missing.
>
> Thanks!
>
>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://googleadsdeveloper.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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
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 adwords-api+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to