Re: Oauth2 jwt ruby issue

2013-07-22 Thread Danial Klimkin
I am closing this thread as it is an old one, unrelated to this question 
(it was about jwt) and the same question is discussed on several other 
threads.


-Danial, AdWords API Team.


On Saturday, July 20, 2013 2:30:47 AM UTC+4, Matthew Ledom wrote:

 Did you ever answer the question about using the refresh token in:

 token = { :refresh_token = '' }
 api.authorize({:oauth2_token = token})

 The sample app does not show how to use that. I have setup the sample app 
 and it works great. In my application I can't have the user logging in all 
 the time and I'm trying to store the refresh token, access token and even 
 the code from the browser redirect auth. I can't figure out how to use the 
 different tokens to authenicate without getting OAUTH_TOKEN_INVALID

 On Tuesday, March 26, 2013 3:28:11 AM UTC-4, Danial Klimkin wrote:

 Hello hagay,


 Yes, JWT is supported in the Ruby library. See this example:

   
 https://code.google.com/p/google-api-ads-ruby/source/browse/adwords_api/examples/v201302/misc/use_oauth2_jwt.rb

 Most likely you only need to alter your configuration file to include:

 :authentication:
   :method: OAUTH2_JWT
   :oauth2_issuer: 'your issuer'
   :oauth2_secret: 'your secret'
   :oauth2_keyfile: '/path/to/the/keyfile'
   :oauth2_prn: 'account to impersonate'


 -Danial, AdWords API Team.


 On Wednesday, March 20, 2013 7:10:04 PM UTC+4, hagay wrote:

 Hi Daniel,

 In my company we have our own domain. and we prefer to gain oauth2 
 without user interaction as the nature of our application is server side 
 only.
 Is the Oauth2 jwt  working for ruby users? if not is there a chance to 
 use another library (say python) in order to use the oauth2-jwt
 What do i need to prepare in order to use oauth2-jwt.

 Your help are most appreciated.

 hagay.

 On Monday, February 18, 2013 1:16:35 PM UTC+2, Danial Klimkin wrote:

 Hello,


 I am sorry we can not provide support on domain administration. Please 
 consider using non-JWT flow (which is a better approach in most cases) as 
 I 
 outlined in this thread.


 -Danial, AdWords API Team.


 On Thursday, February 14, 2013 7:06:28 PM UTC+4, 
 jmcu...@restorando.comwrote:

 Hi Danial, I'm having the same problem here.

 I'm using OAuth2_Jwt with this config:

   :oauth2_issuer: xx...@developer.gserviceaccount.com' 
   :oauth2_secret: 'notasecret'
   :oauth2_keyfile: '/path/to/privatekey.p12'
   :oauth2_prn: 'email i use to log in to google adwords account' 

   # Other parameters.
   :developer_token: 'xx'
   :client_customer_id: ''

 and I get this message:

 Signet::AuthorizationError: Authorization failed.  Server message:
 {
   error : access_denied
 }

 I manage my own domain but I cannot find how to grant the application 
 to impersonate users for AdWords without using the Business Edition. 
 Could 
 you please tell me how could I do that?



 On Thursday, February 14, 2013 10:26:32 AM UTC-3, hagay wrote:


 Hi Daniel, 
 Ok. In that case i guess I should use the the Oauth2 .

 The issue is that I need to access the adsowrds api (using oauth2) 
 *without 
 user interaction*. Do i still need  the 'Service account' or 
 'Installed Application' ?
 If I need to use the 'Installed Application' how can i fetch the 
 verification_code every time i restart my server ?


 Thanks for your help.
 hagay.


 On Thursday, February 14, 2013 12:40:29 PM UTC+2, Danial Klimkin 
 wrote:

 Hello hagay,


 You should only use OAUTH2_JWT if you are administering your own 
 domain. If you access 3rd party accounts, you should use plain OAUTH2.

 In case you do manage the domain, you need to grant the application 
 to impersonate users for AdWords, please check with your domain 
 administrator on have to do this.

 See also:

   https://developers.google.com/accounts/docs/OAuth2ServiceAccount


 -Danial, AdWords API Team.


 On Wednesday, February 13, 2013 6:55:14 PM UTC+4, hagay wrote:

 Hi,

 I am writing server side application that using adwords_api, witch 
 mean i should use OAUTH2_JWT, right?

 To create the client id i used the api console with the option of 
  'service_account'. 

 to the config file i am using:
   :authentication = {
 :method: OAUTH2_JWT
 :oauth2_issuer:  the email address i got  within the creation 
 of the this client id 
 :oauth2_secret: *notasecret* #Is it correct?
 :oauth2_keyfile: '/path/to/key.p12' # this filed downloaded 
 :developer_token: 'dev_token',
 :client_customer_id: '123-456-7890'# the client_customer_id 
 i used with the adwords api
   } 

 i am getting the error:

 Signet::AuthorizationError: Authorization failed.  Server message:
 {
   error : invalid_grant
 }

 what am i doing wrong?




 On Tuesday, January 15, 2013 2:04:53 PM UTC+2, Danial Klimkin wrote:

 Hello Georgi,


 If you initialize the library with a hash, you need to make sure 
 to provide all required credentials. Make sure to include all 
 required 
 fields like this:

 adwords = 

Re: Oauth2 jwt ruby issue

2013-07-19 Thread Matthew Ledom
Did you ever answer the question about using the refresh token in:

token = { :refresh_token = '' }
api.authorize({:oauth2_token = token})

The sample app does not show how to use that. I have setup the sample app 
and it works great. In my application I can't have the user logging in all 
the time and I'm trying to store the refresh token, access token and even 
the code from the browser redirect auth. I can't figure out how to use the 
different tokens to authenicate without getting OAUTH_TOKEN_INVALID

On Tuesday, March 26, 2013 3:28:11 AM UTC-4, Danial Klimkin wrote:

 Hello hagay,


 Yes, JWT is supported in the Ruby library. See this example:

   
 https://code.google.com/p/google-api-ads-ruby/source/browse/adwords_api/examples/v201302/misc/use_oauth2_jwt.rb

 Most likely you only need to alter your configuration file to include:

 :authentication:
   :method: OAUTH2_JWT
   :oauth2_issuer: 'your issuer'
   :oauth2_secret: 'your secret'
   :oauth2_keyfile: '/path/to/the/keyfile'
   :oauth2_prn: 'account to impersonate'


 -Danial, AdWords API Team.


 On Wednesday, March 20, 2013 7:10:04 PM UTC+4, hagay wrote:

 Hi Daniel,

 In my company we have our own domain. and we prefer to gain oauth2 
 without user interaction as the nature of our application is server side 
 only.
 Is the Oauth2 jwt  working for ruby users? if not is there a chance to 
 use another library (say python) in order to use the oauth2-jwt
 What do i need to prepare in order to use oauth2-jwt.

 Your help are most appreciated.

 hagay.

 On Monday, February 18, 2013 1:16:35 PM UTC+2, Danial Klimkin wrote:

 Hello,


 I am sorry we can not provide support on domain administration. Please 
 consider using non-JWT flow (which is a better approach in most cases) as I 
 outlined in this thread.


 -Danial, AdWords API Team.


 On Thursday, February 14, 2013 7:06:28 PM UTC+4, 
 jmcu...@restorando.comwrote:

 Hi Danial, I'm having the same problem here.

 I'm using OAuth2_Jwt with this config:

   :oauth2_issuer: xx...@developer.gserviceaccount.com' 
   :oauth2_secret: 'notasecret'
   :oauth2_keyfile: '/path/to/privatekey.p12'
   :oauth2_prn: 'email i use to log in to google adwords account' 

   # Other parameters.
   :developer_token: 'xx'
   :client_customer_id: ''

 and I get this message:

 Signet::AuthorizationError: Authorization failed.  Server message:
 {
   error : access_denied
 }

 I manage my own domain but I cannot find how to grant the application 
 to impersonate users for AdWords without using the Business Edition. Could 
 you please tell me how could I do that?



 On Thursday, February 14, 2013 10:26:32 AM UTC-3, hagay wrote:


 Hi Daniel, 
 Ok. In that case i guess I should use the the Oauth2 .

 The issue is that I need to access the adsowrds api (using oauth2) 
 *without 
 user interaction*. Do i still need  the 'Service account' or 
 'Installed Application' ?
 If I need to use the 'Installed Application' how can i fetch the 
 verification_code every time i restart my server ?


 Thanks for your help.
 hagay.


 On Thursday, February 14, 2013 12:40:29 PM UTC+2, Danial Klimkin wrote:

 Hello hagay,


 You should only use OAUTH2_JWT if you are administering your own 
 domain. If you access 3rd party accounts, you should use plain OAUTH2.

 In case you do manage the domain, you need to grant the application 
 to impersonate users for AdWords, please check with your domain 
 administrator on have to do this.

 See also:

   https://developers.google.com/accounts/docs/OAuth2ServiceAccount


 -Danial, AdWords API Team.


 On Wednesday, February 13, 2013 6:55:14 PM UTC+4, hagay wrote:

 Hi,

 I am writing server side application that using adwords_api, witch 
 mean i should use OAUTH2_JWT, right?

 To create the client id i used the api console with the option of 
  'service_account'. 

 to the config file i am using:
   :authentication = {
 :method: OAUTH2_JWT
 :oauth2_issuer:  the email address i got  within the creation 
 of the this client id 
 :oauth2_secret: *notasecret* #Is it correct?
 :oauth2_keyfile: '/path/to/key.p12' # this filed downloaded 
 :developer_token: 'dev_token',
 :client_customer_id: '123-456-7890'# the client_customer_id 
 i used with the adwords api
   } 

 i am getting the error:

 Signet::AuthorizationError: Authorization failed.  Server message:
 {
   error : invalid_grant
 }

 what am i doing wrong?




 On Tuesday, January 15, 2013 2:04:53 PM UTC+2, Danial Klimkin wrote:

 Hello Georgi,


 If you initialize the library with a hash, you need to make sure to 
 provide all required credentials. Make sure to include all required 
 fields 
 like this:

 adwords = AdwordsApi::Api.new({
   :service = {
 :environment = :PRODUCTION
   },
   :library = {
 :log_level = DEBUG
   },
   :authentication = {
 :method: OAUTH2_JWT
 :oauth2_issuer: '12345...@developer.gserviceaccount.com'
 :oauth2_secret: 'key_secret'
 :oauth2_keyfile: 

Re: Oauth2 jwt ruby issue

2013-03-26 Thread Danial Klimkin
Hello hagay,


Yes, JWT is supported in the Ruby library. See this example:

  
https://code.google.com/p/google-api-ads-ruby/source/browse/adwords_api/examples/v201302/misc/use_oauth2_jwt.rb

Most likely you only need to alter your configuration file to include:

:authentication:
  :method: OAUTH2_JWT
  :oauth2_issuer: 'your issuer'
  :oauth2_secret: 'your secret'
  :oauth2_keyfile: '/path/to/the/keyfile'
  :oauth2_prn: 'account to impersonate'


-Danial, AdWords API Team.


On Wednesday, March 20, 2013 7:10:04 PM UTC+4, hagay wrote:

 Hi Daniel,

 In my company we have our own domain. and we prefer to gain oauth2 without 
 user interaction as the nature of our application is server side only.
 Is the Oauth2 jwt  working for ruby users? if not is there a chance to use 
 another library (say python) in order to use the oauth2-jwt
 What do i need to prepare in order to use oauth2-jwt.

 Your help are most appreciated.

 hagay.

 On Monday, February 18, 2013 1:16:35 PM UTC+2, Danial Klimkin wrote:

 Hello,


 I am sorry we can not provide support on domain administration. Please 
 consider using non-JWT flow (which is a better approach in most cases) as I 
 outlined in this thread.


 -Danial, AdWords API Team.


 On Thursday, February 14, 2013 7:06:28 PM UTC+4, jmcu...@restorando.comwrote:

 Hi Danial, I'm having the same problem here.

 I'm using OAuth2_Jwt with this config:

   :oauth2_issuer: xx...@developer.gserviceaccount.com' 
   :oauth2_secret: 'notasecret'
   :oauth2_keyfile: '/path/to/privatekey.p12'
   :oauth2_prn: 'email i use to log in to google adwords account' 

   # Other parameters.
   :developer_token: 'xx'
   :client_customer_id: ''

 and I get this message:

 Signet::AuthorizationError: Authorization failed.  Server message:
 {
   error : access_denied
 }

 I manage my own domain but I cannot find how to grant the application to 
 impersonate users for AdWords without using the Business Edition. Could you 
 please tell me how could I do that?



 On Thursday, February 14, 2013 10:26:32 AM UTC-3, hagay wrote:


 Hi Daniel, 
 Ok. In that case i guess I should use the the Oauth2 .

 The issue is that I need to access the adsowrds api (using oauth2) 
 *without 
 user interaction*. Do i still need  the 'Service account' or 
 'Installed Application' ?
 If I need to use the 'Installed Application' how can i fetch the 
 verification_code every time i restart my server ?


 Thanks for your help.
 hagay.


 On Thursday, February 14, 2013 12:40:29 PM UTC+2, Danial Klimkin wrote:

 Hello hagay,


 You should only use OAUTH2_JWT if you are administering your own 
 domain. If you access 3rd party accounts, you should use plain OAUTH2.

 In case you do manage the domain, you need to grant the application to 
 impersonate users for AdWords, please check with your domain 
 administrator 
 on have to do this.

 See also:

   https://developers.google.com/accounts/docs/OAuth2ServiceAccount


 -Danial, AdWords API Team.


 On Wednesday, February 13, 2013 6:55:14 PM UTC+4, hagay wrote:

 Hi,

 I am writing server side application that using adwords_api, witch 
 mean i should use OAUTH2_JWT, right?

 To create the client id i used the api console with the option of 
  'service_account'. 

 to the config file i am using:
   :authentication = {
 :method: OAUTH2_JWT
 :oauth2_issuer:  the email address i got  within the creation 
 of the this client id 
 :oauth2_secret: *notasecret* #Is it correct?
 :oauth2_keyfile: '/path/to/key.p12' # this filed downloaded 
 :developer_token: 'dev_token',
 :client_customer_id: '123-456-7890'# the client_customer_id i 
 used with the adwords api
   } 

 i am getting the error:

 Signet::AuthorizationError: Authorization failed.  Server message:
 {
   error : invalid_grant
 }

 what am i doing wrong?




 On Tuesday, January 15, 2013 2:04:53 PM UTC+2, Danial Klimkin wrote:

 Hello Georgi,


 If you initialize the library with a hash, you need to make sure to 
 provide all required credentials. Make sure to include all required 
 fields 
 like this:

 adwords = AdwordsApi::Api.new({
   :service = {
 :environment = :PRODUCTION
   },
   :library = {
 :log_level = DEBUG
   },
   :authentication = {
 :method: OAUTH2_JWT
 :oauth2_issuer: '12345...@developer.gserviceaccount.com'
 :oauth2_secret: 'key_secret'
 :oauth2_keyfile: '/path/to/key.p12'
 :developer_token: 'dev_token',
 :client_customer_id: '123-456-7890'
   }
 }) 


 -Danial, AdWords API Team.

 On Monday, January 14, 2013 4:05:36 PM UTC+4, teamma...@gmail.comwrote:

 Hello everyone, 

 We’ve recently started to use adwords api and now we are trying to 
 automate few tasks. We’re using OAuth2 authentication and ruby. 

 We’ve followed the example here 
 

Re: Oauth2 jwt ruby issue

2013-03-20 Thread hagay
Hi Daniel,

In my company we have our own domain. and we prefer to gain oauth2 without 
user interaction as the nature of our application is server side only.
Is the Oauth2 jwt  working for ruby users? if not is there a chance to use 
another library (say python) in order to use the oauth2-jwt
What do i need to prepare in order to use oauth2-jwt.

Your help are most appreciated.

hagay.

On Monday, February 18, 2013 1:16:35 PM UTC+2, Danial Klimkin wrote:

 Hello,


 I am sorry we can not provide support on domain administration. Please 
 consider using non-JWT flow (which is a better approach in most cases) as I 
 outlined in this thread.


 -Danial, AdWords API Team.


 On Thursday, February 14, 2013 7:06:28 PM UTC+4, jmcu...@restorando.comwrote:

 Hi Danial, I'm having the same problem here.

 I'm using OAuth2_Jwt with this config:

   :oauth2_issuer: xx...@developer.gserviceaccount.com' 
   :oauth2_secret: 'notasecret'
   :oauth2_keyfile: '/path/to/privatekey.p12'
   :oauth2_prn: 'email i use to log in to google adwords account' 

   # Other parameters.
   :developer_token: 'xx'
   :client_customer_id: ''

 and I get this message:

 Signet::AuthorizationError: Authorization failed.  Server message:
 {
   error : access_denied
 }

 I manage my own domain but I cannot find how to grant the application to 
 impersonate users for AdWords without using the Business Edition. Could you 
 please tell me how could I do that?



 On Thursday, February 14, 2013 10:26:32 AM UTC-3, hagay wrote:


 Hi Daniel, 
 Ok. In that case i guess I should use the the Oauth2 .

 The issue is that I need to access the adsowrds api (using oauth2) *without 
 user interaction*. Do i still need  the 'Service account' or 'Installed 
 Application' ?
 If I need to use the 'Installed Application' how can i fetch the 
 verification_code every time i restart my server ?


 Thanks for your help.
 hagay.


 On Thursday, February 14, 2013 12:40:29 PM UTC+2, Danial Klimkin wrote:

 Hello hagay,


 You should only use OAUTH2_JWT if you are administering your own 
 domain. If you access 3rd party accounts, you should use plain OAUTH2.

 In case you do manage the domain, you need to grant the application to 
 impersonate users for AdWords, please check with your domain administrator 
 on have to do this.

 See also:

   https://developers.google.com/accounts/docs/OAuth2ServiceAccount


 -Danial, AdWords API Team.


 On Wednesday, February 13, 2013 6:55:14 PM UTC+4, hagay wrote:

 Hi,

 I am writing server side application that using adwords_api, witch 
 mean i should use OAUTH2_JWT, right?

 To create the client id i used the api console with the option of 
  'service_account'. 

 to the config file i am using:
   :authentication = {
 :method: OAUTH2_JWT
 :oauth2_issuer:  the email address i got  within the creation of 
 the this client id 
 :oauth2_secret: *notasecret* #Is it correct?
 :oauth2_keyfile: '/path/to/key.p12' # this filed downloaded 
 :developer_token: 'dev_token',
 :client_customer_id: '123-456-7890'# the client_customer_id i 
 used with the adwords api
   } 

 i am getting the error:

 Signet::AuthorizationError: Authorization failed.  Server message:
 {
   error : invalid_grant
 }

 what am i doing wrong?




 On Tuesday, January 15, 2013 2:04:53 PM UTC+2, Danial Klimkin wrote:

 Hello Georgi,


 If you initialize the library with a hash, you need to make sure to 
 provide all required credentials. Make sure to include all required 
 fields 
 like this:

 adwords = AdwordsApi::Api.new({
   :service = {
 :environment = :PRODUCTION
   },
   :library = {
 :log_level = DEBUG
   },
   :authentication = {
 :method: OAUTH2_JWT
 :oauth2_issuer: '12345...@developer.gserviceaccount.com'
 :oauth2_secret: 'key_secret'
 :oauth2_keyfile: '/path/to/key.p12'
 :developer_token: 'dev_token',
 :client_customer_id: '123-456-7890'
   }
 }) 


 -Danial, AdWords API Team.

 On Monday, January 14, 2013 4:05:36 PM UTC+4, teamma...@gmail.comwrote:

 Hello everyone, 

 We’ve recently started to use adwords api and now we are trying to 
 automate few tasks. We’re using OAuth2 authentication and ruby. 

 We’ve followed the example here 
 https://code.google.com/p/google-api-ads-ruby/source/browse/adwords_api/examples/v201209/misc/use_oauth2_jwt.rbhttps://code.google.com/p/google-api-ads-ruby/source/browse/adwords_api/examples/v201209/misc/use_oauth2.rbto
  authenticate, the only difference is how we initialize the adwords api:

 adwords = AdwordsApi::Api.new({

 :library = {

   :log_level = DEBUG

 }}) 

 # option 1 and option 2 not modified from the example

 campaign_srv = adwords.service(:CampaignService, API_VERSION)


 We’ve downloaded the private key file and the path is set correctly 
 and we’ve tried both options. This is the error we get: 

 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/credential_handler.rb:65:in
  
 

Re: Oauth2 jwt ruby issue

2013-03-19 Thread hagay
Hi Daniel,

Can you please, give me a code example for how to use the refresh_token. I 
tried this:
 
token = { :refresh_token = '' }
api.authorize({:oauth2_token = token})


Thanks in advanced for your help.
hagay. (clock is running out for ver201206...)

On Monday, February 18, 2013 1:15:29 PM UTC+2, Danial Klimkin wrote:

 Hello hagay,


 You can use OAuth2 to achieve that. There will be user interaction require 
 *once* -- the step with the verification code. After that, you need to 
 store the refresh token and use it every time you need to access the 
 account. You will not need user input again -- as long as the access was 
 not reverted.

 Please refer to my demo application on how to retrieve, store and re-use 
 the token:

   http://code.google.com/p/google-api-ads-ruby/wiki/AdWordsRailsDemo


 -Danial, AdWords API Team.




 On Thursday, February 14, 2013 5:26:32 PM UTC+4, hagay wrote:


 Hi Daniel, 
 Ok. In that case i guess I should use the the Oauth2 .

 The issue is that I need to access the adsowrds api (using oauth2) *without 
 user interaction*. Do i still need  the 'Service account' or 'Installed 
 Application' ?
 If I need to use the 'Installed Application' how can i fetch the 
 verification_code every time i restart my server ?


 Thanks for your help.
 hagay.


 On Thursday, February 14, 2013 12:40:29 PM UTC+2, Danial Klimkin wrote:

 Hello hagay,


 You should only use OAUTH2_JWT if you are administering your own domain. 
 If you access 3rd party accounts, you should use plain OAUTH2.

 In case you do manage the domain, you need to grant the application to 
 impersonate users for AdWords, please check with your domain administrator 
 on have to do this.

 See also:

   https://developers.google.com/accounts/docs/OAuth2ServiceAccount


 -Danial, AdWords API Team.


 On Wednesday, February 13, 2013 6:55:14 PM UTC+4, hagay wrote:

 Hi,

 I am writing server side application that using adwords_api, witch mean 
 i should use OAUTH2_JWT, right?

 To create the client id i used the api console with the option of 
  'service_account'. 

 to the config file i am using:
   :authentication = {
 :method: OAUTH2_JWT
 :oauth2_issuer:  the email address i got  within the creation of 
 the this client id 
 :oauth2_secret: *notasecret* #Is it correct?
 :oauth2_keyfile: '/path/to/key.p12' # this filed downloaded 
 :developer_token: 'dev_token',
 :client_customer_id: '123-456-7890'# the client_customer_id i 
 used with the adwords api
   } 

 i am getting the error:

 Signet::AuthorizationError: Authorization failed.  Server message:
 {
   error : invalid_grant
 }

 what am i doing wrong?




 On Tuesday, January 15, 2013 2:04:53 PM UTC+2, Danial Klimkin wrote:

 Hello Georgi,


 If you initialize the library with a hash, you need to make sure to 
 provide all required credentials. Make sure to include all required 
 fields 
 like this:

 adwords = AdwordsApi::Api.new({
   :service = {
 :environment = :PRODUCTION
   },
   :library = {
 :log_level = DEBUG
   },
   :authentication = {
 :method: OAUTH2_JWT
 :oauth2_issuer: '12345...@developer.gserviceaccount.com'
 :oauth2_secret: 'key_secret'
 :oauth2_keyfile: '/path/to/key.p12'
 :developer_token: 'dev_token',
 :client_customer_id: '123-456-7890'
   }
 }) 


 -Danial, AdWords API Team.

 On Monday, January 14, 2013 4:05:36 PM UTC+4, teamma...@gmail.comwrote:

 Hello everyone, 

 We’ve recently started to use adwords api and now we are trying to 
 automate few tasks. We’re using OAuth2 authentication and ruby. 

 We’ve followed the example here 
 https://code.google.com/p/google-api-ads-ruby/source/browse/adwords_api/examples/v201209/misc/use_oauth2_jwt.rbhttps://code.google.com/p/google-api-ads-ruby/source/browse/adwords_api/examples/v201209/misc/use_oauth2.rbto
  authenticate, the only difference is how we initialize the adwords api:

 adwords = AdwordsApi::Api.new({

 :library = {

   :log_level = DEBUG

 }}) 

 # option 1 and option 2 not modified from the example

 campaign_srv = adwords.service(:CampaignService, API_VERSION)


 We’ve downloaded the private key file and the path is set correctly 
 and we’ve tried both options. This is the error we get: 

 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/credential_handler.rb:65:in
  
 `set_credential': undefined method `[]=' for nil:NilClass (NoMethodError)

 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/api.rb:103:in
  
 `block in authorize'

 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/api.rb:102:in
  
 `each_pair'

 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/api.rb:102:in
  
 `authorize'


 Let me know if you need further information, i would like to find out 
 the possible reason for that error or if there is any error in our 
 configuration or code?

  

 Thank you in advance for 

Re: Oauth2 jwt ruby issue

2013-02-18 Thread Danial Klimkin
Hello hagay,


You can use OAuth2 to achieve that. There will be user interaction require *
once* -- the step with the verification code. After that, you need to store 
the refresh token and use it every time you need to access the account. You 
will not need user input again -- as long as the access was not reverted.

Please refer to my demo application on how to retrieve, store and re-use 
the token:

  http://code.google.com/p/google-api-ads-ruby/wiki/AdWordsRailsDemo


-Danial, AdWords API Team.




On Thursday, February 14, 2013 5:26:32 PM UTC+4, hagay wrote:


 Hi Daniel, 
 Ok. In that case i guess I should use the the Oauth2 .

 The issue is that I need to access the adsowrds api (using oauth2) *without 
 user interaction*. Do i still need  the 'Service account' or 'Installed 
 Application' ?
 If I need to use the 'Installed Application' how can i fetch the 
 verification_code every time i restart my server ?


 Thanks for your help.
 hagay.


 On Thursday, February 14, 2013 12:40:29 PM UTC+2, Danial Klimkin wrote:

 Hello hagay,


 You should only use OAUTH2_JWT if you are administering your own domain. 
 If you access 3rd party accounts, you should use plain OAUTH2.

 In case you do manage the domain, you need to grant the application to 
 impersonate users for AdWords, please check with your domain administrator 
 on have to do this.

 See also:

   https://developers.google.com/accounts/docs/OAuth2ServiceAccount


 -Danial, AdWords API Team.


 On Wednesday, February 13, 2013 6:55:14 PM UTC+4, hagay wrote:

 Hi,

 I am writing server side application that using adwords_api, witch mean 
 i should use OAUTH2_JWT, right?

 To create the client id i used the api console with the option of 
  'service_account'. 

 to the config file i am using:
   :authentication = {
 :method: OAUTH2_JWT
 :oauth2_issuer:  the email address i got  within the creation of 
 the this client id 
 :oauth2_secret: *notasecret* #Is it correct?
 :oauth2_keyfile: '/path/to/key.p12' # this filed downloaded 
 :developer_token: 'dev_token',
 :client_customer_id: '123-456-7890'# the client_customer_id i 
 used with the adwords api
   } 

 i am getting the error:

 Signet::AuthorizationError: Authorization failed.  Server message:
 {
   error : invalid_grant
 }

 what am i doing wrong?




 On Tuesday, January 15, 2013 2:04:53 PM UTC+2, Danial Klimkin wrote:

 Hello Georgi,


 If you initialize the library with a hash, you need to make sure to 
 provide all required credentials. Make sure to include all required fields 
 like this:

 adwords = AdwordsApi::Api.new({
   :service = {
 :environment = :PRODUCTION
   },
   :library = {
 :log_level = DEBUG
   },
   :authentication = {
 :method: OAUTH2_JWT
 :oauth2_issuer: '12345...@developer.gserviceaccount.com'
 :oauth2_secret: 'key_secret'
 :oauth2_keyfile: '/path/to/key.p12'
 :developer_token: 'dev_token',
 :client_customer_id: '123-456-7890'
   }
 }) 


 -Danial, AdWords API Team.

 On Monday, January 14, 2013 4:05:36 PM UTC+4, teamma...@gmail.comwrote:

 Hello everyone, 

 We’ve recently started to use adwords api and now we are trying to 
 automate few tasks. We’re using OAuth2 authentication and ruby. 

 We’ve followed the example here 
 https://code.google.com/p/google-api-ads-ruby/source/browse/adwords_api/examples/v201209/misc/use_oauth2_jwt.rbhttps://code.google.com/p/google-api-ads-ruby/source/browse/adwords_api/examples/v201209/misc/use_oauth2.rbto
  authenticate, the only difference is how we initialize the adwords api:

 adwords = AdwordsApi::Api.new({

 :library = {

   :log_level = DEBUG

 }}) 

 # option 1 and option 2 not modified from the example

 campaign_srv = adwords.service(:CampaignService, API_VERSION)


 We’ve downloaded the private key file and the path is set correctly 
 and we’ve tried both options. This is the error we get: 

 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/credential_handler.rb:65:in
  
 `set_credential': undefined method `[]=' for nil:NilClass (NoMethodError)

 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/api.rb:103:in
  
 `block in authorize'

 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/api.rb:102:in
  
 `each_pair'

 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/api.rb:102:in
  
 `authorize'


 Let me know if you need further information, i would like to find out 
 the possible reason for that error or if there is any error in our 
 configuration or code?

  

 Thank you in advance for your time,

 Georgi



-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 

Re: Oauth2 jwt ruby issue

2013-02-18 Thread Danial Klimkin
Hello,


I am sorry we can not provide support on domain administration. Please 
consider using non-JWT flow (which is a better approach in most cases) as I 
outlined in this thread.


-Danial, AdWords API Team.


On Thursday, February 14, 2013 7:06:28 PM UTC+4, jmcu...@restorando.com 
wrote:

 Hi Danial, I'm having the same problem here.

 I'm using OAuth2_Jwt with this config:

   :oauth2_issuer: xx...@developer.gserviceaccount.com javascript:' 
   :oauth2_secret: 'notasecret'
   :oauth2_keyfile: '/path/to/privatekey.p12'
   :oauth2_prn: 'email i use to log in to google adwords account' 

   # Other parameters.
   :developer_token: 'xx'
   :client_customer_id: ''

 and I get this message:

 Signet::AuthorizationError: Authorization failed.  Server message:
 {
   error : access_denied
 }

 I manage my own domain but I cannot find how to grant the application to 
 impersonate users for AdWords without using the Business Edition. Could you 
 please tell me how could I do that?



 On Thursday, February 14, 2013 10:26:32 AM UTC-3, hagay wrote:


 Hi Daniel, 
 Ok. In that case i guess I should use the the Oauth2 .

 The issue is that I need to access the adsowrds api (using oauth2) *without 
 user interaction*. Do i still need  the 'Service account' or 'Installed 
 Application' ?
 If I need to use the 'Installed Application' how can i fetch the 
 verification_code every time i restart my server ?


 Thanks for your help.
 hagay.


 On Thursday, February 14, 2013 12:40:29 PM UTC+2, Danial Klimkin wrote:

 Hello hagay,


 You should only use OAUTH2_JWT if you are administering your own domain. 
 If you access 3rd party accounts, you should use plain OAUTH2.

 In case you do manage the domain, you need to grant the application to 
 impersonate users for AdWords, please check with your domain administrator 
 on have to do this.

 See also:

   https://developers.google.com/accounts/docs/OAuth2ServiceAccount


 -Danial, AdWords API Team.


 On Wednesday, February 13, 2013 6:55:14 PM UTC+4, hagay wrote:

 Hi,

 I am writing server side application that using adwords_api, witch mean 
 i should use OAUTH2_JWT, right?

 To create the client id i used the api console with the option of 
  'service_account'. 

 to the config file i am using:
   :authentication = {
 :method: OAUTH2_JWT
 :oauth2_issuer:  the email address i got  within the creation of 
 the this client id 
 :oauth2_secret: *notasecret* #Is it correct?
 :oauth2_keyfile: '/path/to/key.p12' # this filed downloaded 
 :developer_token: 'dev_token',
 :client_customer_id: '123-456-7890'# the client_customer_id i 
 used with the adwords api
   } 

 i am getting the error:

 Signet::AuthorizationError: Authorization failed.  Server message:
 {
   error : invalid_grant
 }

 what am i doing wrong?




 On Tuesday, January 15, 2013 2:04:53 PM UTC+2, Danial Klimkin wrote:

 Hello Georgi,


 If you initialize the library with a hash, you need to make sure to 
 provide all required credentials. Make sure to include all required 
 fields 
 like this:

 adwords = AdwordsApi::Api.new({
   :service = {
 :environment = :PRODUCTION
   },
   :library = {
 :log_level = DEBUG
   },
   :authentication = {
 :method: OAUTH2_JWT
 :oauth2_issuer: '12345...@developer.gserviceaccount.com'
 :oauth2_secret: 'key_secret'
 :oauth2_keyfile: '/path/to/key.p12'
 :developer_token: 'dev_token',
 :client_customer_id: '123-456-7890'
   }
 }) 


 -Danial, AdWords API Team.

 On Monday, January 14, 2013 4:05:36 PM UTC+4, teamma...@gmail.comwrote:

 Hello everyone, 

 We’ve recently started to use adwords api and now we are trying to 
 automate few tasks. We’re using OAuth2 authentication and ruby. 

 We’ve followed the example here 
 https://code.google.com/p/google-api-ads-ruby/source/browse/adwords_api/examples/v201209/misc/use_oauth2_jwt.rbhttps://code.google.com/p/google-api-ads-ruby/source/browse/adwords_api/examples/v201209/misc/use_oauth2.rbto
  authenticate, the only difference is how we initialize the adwords api:

 adwords = AdwordsApi::Api.new({

 :library = {

   :log_level = DEBUG

 }}) 

 # option 1 and option 2 not modified from the example

 campaign_srv = adwords.service(:CampaignService, API_VERSION)


 We’ve downloaded the private key file and the path is set correctly 
 and we’ve tried both options. This is the error we get: 

 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/credential_handler.rb:65:in
  
 `set_credential': undefined method `[]=' for nil:NilClass (NoMethodError)

 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/api.rb:103:in
  
 `block in authorize'

 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/api.rb:102:in
  
 `each_pair'

 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/api.rb:102:in
  
 `authorize'


 Let me know if you need 

Re: Oauth2 jwt ruby issue

2013-02-14 Thread Danial Klimkin
Hello hagay,


You should only use OAUTH2_JWT if you are administering your own domain. If 
you access 3rd party accounts, you should use plain OAUTH2.

In case you do manage the domain, you need to grant the application to 
impersonate users for AdWords, please check with your domain administrator 
on have to do this.

See also:

  https://developers.google.com/accounts/docs/OAuth2ServiceAccount


-Danial, AdWords API Team.


On Wednesday, February 13, 2013 6:55:14 PM UTC+4, hagay wrote:

 Hi,

 I am writing server side application that using adwords_api, witch mean i 
 should use OAUTH2_JWT, right?

 To create the client id i used the api console with the option of 
  'service_account'. 

 to the config file i am using:
   :authentication = {
 :method: OAUTH2_JWT
 :oauth2_issuer:  the email address i got  within the creation of the 
 this client id 
 :oauth2_secret: *notasecret* #Is it correct?
 :oauth2_keyfile: '/path/to/key.p12' # this filed downloaded 
 :developer_token: 'dev_token',
 :client_customer_id: '123-456-7890'# the client_customer_id i used 
 with the adwords api
   } 

 i am getting the error:

 Signet::AuthorizationError: Authorization failed.  Server message:
 {
   error : invalid_grant
 }

 what am i doing wrong?




 On Tuesday, January 15, 2013 2:04:53 PM UTC+2, Danial Klimkin wrote:

 Hello Georgi,


 If you initialize the library with a hash, you need to make sure to 
 provide all required credentials. Make sure to include all required fields 
 like this:

 adwords = AdwordsApi::Api.new({
   :service = {
 :environment = :PRODUCTION
   },
   :library = {
 :log_level = DEBUG
   },
   :authentication = {
 :method: OAUTH2_JWT
 :oauth2_issuer: '12345...@developer.gserviceaccount.com'
 :oauth2_secret: 'key_secret'
 :oauth2_keyfile: '/path/to/key.p12'
 :developer_token: 'dev_token',
 :client_customer_id: '123-456-7890'
   }
 }) 


 -Danial, AdWords API Team.

 On Monday, January 14, 2013 4:05:36 PM UTC+4, teamma...@gmail.com wrote:

 Hello everyone, 

 We’ve recently started to use adwords api and now we are trying to 
 automate few tasks. We’re using OAuth2 authentication and ruby. 

 We’ve followed the example here 
 https://code.google.com/p/google-api-ads-ruby/source/browse/adwords_api/examples/v201209/misc/use_oauth2_jwt.rbhttps://code.google.com/p/google-api-ads-ruby/source/browse/adwords_api/examples/v201209/misc/use_oauth2.rbto
  authenticate, the only difference is how we initialize the adwords api:

 adwords = AdwordsApi::Api.new({

 :library = {

   :log_level = DEBUG

 }}) 

 # option 1 and option 2 not modified from the example

 campaign_srv = adwords.service(:CampaignService, API_VERSION)


 We’ve downloaded the private key file and the path is set correctly and 
 we’ve tried both options. This is the error we get: 

 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/credential_handler.rb:65:in
  
 `set_credential': undefined method `[]=' for nil:NilClass (NoMethodError)

 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/api.rb:103:in
  
 `block in authorize'

 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/api.rb:102:in
  
 `each_pair'

 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/api.rb:102:in
  
 `authorize'


 Let me know if you need further information, i would like to find out 
 the possible reason for that error or if there is any error in our 
 configuration or code?

  

 Thank you in advance for your time,

 Georgi



-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 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.




Re: Oauth2 jwt ruby issue

2013-02-14 Thread hagay

Hi Daniel, 
Ok. In that case i guess I should use the the Oauth2 .

The issue is that I need to access the adsowrds api (using oauth2) *without 
user interaction*. Do i still need  the 'Service account' or 'Installed 
Application' ?
If I need to use the 'Installed Application' how can i fetch the 
verification_code every time i restart my server ?


Thanks for your help.
hagay.


On Thursday, February 14, 2013 12:40:29 PM UTC+2, Danial Klimkin wrote:

 Hello hagay,


 You should only use OAUTH2_JWT if you are administering your own domain. 
 If you access 3rd party accounts, you should use plain OAUTH2.

 In case you do manage the domain, you need to grant the application to 
 impersonate users for AdWords, please check with your domain administrator 
 on have to do this.

 See also:

   https://developers.google.com/accounts/docs/OAuth2ServiceAccount


 -Danial, AdWords API Team.


 On Wednesday, February 13, 2013 6:55:14 PM UTC+4, hagay wrote:

 Hi,

 I am writing server side application that using adwords_api, witch mean i 
 should use OAUTH2_JWT, right?

 To create the client id i used the api console with the option of 
  'service_account'. 

 to the config file i am using:
   :authentication = {
 :method: OAUTH2_JWT
 :oauth2_issuer:  the email address i got  within the creation of 
 the this client id 
 :oauth2_secret: *notasecret* #Is it correct?
 :oauth2_keyfile: '/path/to/key.p12' # this filed downloaded 
 :developer_token: 'dev_token',
 :client_customer_id: '123-456-7890'# the client_customer_id i 
 used with the adwords api
   } 

 i am getting the error:

 Signet::AuthorizationError: Authorization failed.  Server message:
 {
   error : invalid_grant
 }

 what am i doing wrong?




 On Tuesday, January 15, 2013 2:04:53 PM UTC+2, Danial Klimkin wrote:

 Hello Georgi,


 If you initialize the library with a hash, you need to make sure to 
 provide all required credentials. Make sure to include all required fields 
 like this:

 adwords = AdwordsApi::Api.new({
   :service = {
 :environment = :PRODUCTION
   },
   :library = {
 :log_level = DEBUG
   },
   :authentication = {
 :method: OAUTH2_JWT
 :oauth2_issuer: '12345...@developer.gserviceaccount.com'
 :oauth2_secret: 'key_secret'
 :oauth2_keyfile: '/path/to/key.p12'
 :developer_token: 'dev_token',
 :client_customer_id: '123-456-7890'
   }
 }) 


 -Danial, AdWords API Team.

 On Monday, January 14, 2013 4:05:36 PM UTC+4, teamma...@gmail.com wrote:

 Hello everyone, 

 We’ve recently started to use adwords api and now we are trying to 
 automate few tasks. We’re using OAuth2 authentication and ruby. 

 We’ve followed the example here 
 https://code.google.com/p/google-api-ads-ruby/source/browse/adwords_api/examples/v201209/misc/use_oauth2_jwt.rbhttps://code.google.com/p/google-api-ads-ruby/source/browse/adwords_api/examples/v201209/misc/use_oauth2.rbto
  authenticate, the only difference is how we initialize the adwords api:

 adwords = AdwordsApi::Api.new({

 :library = {

   :log_level = DEBUG

 }}) 

 # option 1 and option 2 not modified from the example

 campaign_srv = adwords.service(:CampaignService, API_VERSION)


 We’ve downloaded the private key file and the path is set correctly and 
 we’ve tried both options. This is the error we get: 

 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/credential_handler.rb:65:in
  
 `set_credential': undefined method `[]=' for nil:NilClass (NoMethodError)

 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/api.rb:103:in
  
 `block in authorize'

 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/api.rb:102:in
  
 `each_pair'

 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/api.rb:102:in
  
 `authorize'


 Let me know if you need further information, i would like to find out 
 the possible reason for that error or if there is any error in our 
 configuration or code?

  

 Thank you in advance for your time,

 Georgi



-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 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.




Re: Oauth2 jwt ruby issue

2013-02-14 Thread jmcuello
Hi Danial, I'm having the same problem here.

I'm using OAuth2_Jwt with this config:

  :oauth2_issuer: xx...@developer.gserviceaccount.com' 
  :oauth2_secret: 'notasecret'
  :oauth2_keyfile: '/path/to/privatekey.p12'
  :oauth2_prn: 'email i use to log in to google adwords account' 

  # Other parameters.
  :developer_token: 'xx'
  :client_customer_id: ''

and I get this message:

Signet::AuthorizationError: Authorization failed.  Server message:
{
  error : access_denied
}

I manage my own domain but I cannot find how to grant the application to 
impersonate users for AdWords without using the Business Edition. Could you 
please tell me how could I do that?



On Thursday, February 14, 2013 10:26:32 AM UTC-3, hagay wrote:


 Hi Daniel, 
 Ok. In that case i guess I should use the the Oauth2 .

 The issue is that I need to access the adsowrds api (using oauth2) *without 
 user interaction*. Do i still need  the 'Service account' or 'Installed 
 Application' ?
 If I need to use the 'Installed Application' how can i fetch the 
 verification_code every time i restart my server ?


 Thanks for your help.
 hagay.


 On Thursday, February 14, 2013 12:40:29 PM UTC+2, Danial Klimkin wrote:

 Hello hagay,


 You should only use OAUTH2_JWT if you are administering your own domain. 
 If you access 3rd party accounts, you should use plain OAUTH2.

 In case you do manage the domain, you need to grant the application to 
 impersonate users for AdWords, please check with your domain administrator 
 on have to do this.

 See also:

   https://developers.google.com/accounts/docs/OAuth2ServiceAccount


 -Danial, AdWords API Team.


 On Wednesday, February 13, 2013 6:55:14 PM UTC+4, hagay wrote:

 Hi,

 I am writing server side application that using adwords_api, witch mean 
 i should use OAUTH2_JWT, right?

 To create the client id i used the api console with the option of 
  'service_account'. 

 to the config file i am using:
   :authentication = {
 :method: OAUTH2_JWT
 :oauth2_issuer:  the email address i got  within the creation of 
 the this client id 
 :oauth2_secret: *notasecret* #Is it correct?
 :oauth2_keyfile: '/path/to/key.p12' # this filed downloaded 
 :developer_token: 'dev_token',
 :client_customer_id: '123-456-7890'# the client_customer_id i 
 used with the adwords api
   } 

 i am getting the error:

 Signet::AuthorizationError: Authorization failed.  Server message:
 {
   error : invalid_grant
 }

 what am i doing wrong?




 On Tuesday, January 15, 2013 2:04:53 PM UTC+2, Danial Klimkin wrote:

 Hello Georgi,


 If you initialize the library with a hash, you need to make sure to 
 provide all required credentials. Make sure to include all required fields 
 like this:

 adwords = AdwordsApi::Api.new({
   :service = {
 :environment = :PRODUCTION
   },
   :library = {
 :log_level = DEBUG
   },
   :authentication = {
 :method: OAUTH2_JWT
 :oauth2_issuer: '12345...@developer.gserviceaccount.com'
 :oauth2_secret: 'key_secret'
 :oauth2_keyfile: '/path/to/key.p12'
 :developer_token: 'dev_token',
 :client_customer_id: '123-456-7890'
   }
 }) 


 -Danial, AdWords API Team.

 On Monday, January 14, 2013 4:05:36 PM UTC+4, teamma...@gmail.comwrote:

 Hello everyone, 

 We’ve recently started to use adwords api and now we are trying to 
 automate few tasks. We’re using OAuth2 authentication and ruby. 

 We’ve followed the example here 
 https://code.google.com/p/google-api-ads-ruby/source/browse/adwords_api/examples/v201209/misc/use_oauth2_jwt.rbhttps://code.google.com/p/google-api-ads-ruby/source/browse/adwords_api/examples/v201209/misc/use_oauth2.rbto
  authenticate, the only difference is how we initialize the adwords api:

 adwords = AdwordsApi::Api.new({

 :library = {

   :log_level = DEBUG

 }}) 

 # option 1 and option 2 not modified from the example

 campaign_srv = adwords.service(:CampaignService, API_VERSION)


 We’ve downloaded the private key file and the path is set correctly 
 and we’ve tried both options. This is the error we get: 

 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/credential_handler.rb:65:in
  
 `set_credential': undefined method `[]=' for nil:NilClass (NoMethodError)

 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/api.rb:103:in
  
 `block in authorize'

 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/api.rb:102:in
  
 `each_pair'

 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/api.rb:102:in
  
 `authorize'


 Let me know if you need further information, i would like to find out 
 the possible reason for that error or if there is any error in our 
 configuration or code?

  

 Thank you in advance for your time,

 Georgi



-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:

Re: Oauth2 jwt ruby issue

2013-02-13 Thread hagay
Hi,

I am writing server side application that using adwords_api, witch mean i 
should use OAUTH2_JWT, right?

To create the client id i used the api console with the option of 
 'service_account'. 

to the config file i am using:
  :authentication = {
:method: OAUTH2_JWT
:oauth2_issuer:  the email address i got  within the creation of the 
this client id 
:oauth2_secret: *notasecret* #Is it correct?
:oauth2_keyfile: '/path/to/key.p12' # this filed downloaded 
:developer_token: 'dev_token',
:client_customer_id: '123-456-7890'# the client_customer_id i used 
with the adwords api
  } 

i am getting the error:

Signet::AuthorizationError: Authorization failed.  Server message:
{
  error : invalid_grant
}

what am i doing wrong?




On Tuesday, January 15, 2013 2:04:53 PM UTC+2, Danial Klimkin wrote:

 Hello Georgi,


 If you initialize the library with a hash, you need to make sure to 
 provide all required credentials. Make sure to include all required fields 
 like this:

 adwords = AdwordsApi::Api.new({
   :service = {
 :environment = :PRODUCTION
   },
   :library = {
 :log_level = DEBUG
   },
   :authentication = {
 :method: OAUTH2_JWT
 :oauth2_issuer: '12345...@developer.gserviceaccount.com javascript:'
 :oauth2_secret: 'key_secret'
 :oauth2_keyfile: '/path/to/key.p12'
 :developer_token: 'dev_token',
 :client_customer_id: '123-456-7890'
   }
 }) 


 -Danial, AdWords API Team.

 On Monday, January 14, 2013 4:05:36 PM UTC+4, teamma...@gmail.com wrote:

 Hello everyone, 

 We’ve recently started to use adwords api and now we are trying to 
 automate few tasks. We’re using OAuth2 authentication and ruby. 

 We’ve followed the example here 
 https://code.google.com/p/google-api-ads-ruby/source/browse/adwords_api/examples/v201209/misc/use_oauth2_jwt.rbhttps://code.google.com/p/google-api-ads-ruby/source/browse/adwords_api/examples/v201209/misc/use_oauth2.rbto
  authenticate, the only difference is how we initialize the adwords api:

 adwords = AdwordsApi::Api.new({

 :library = {

   :log_level = DEBUG

 }}) 

 # option 1 and option 2 not modified from the example

 campaign_srv = adwords.service(:CampaignService, API_VERSION)


 We’ve downloaded the private key file and the path is set correctly and 
 we’ve tried both options. This is the error we get: 

 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/credential_handler.rb:65:in
  
 `set_credential': undefined method `[]=' for nil:NilClass (NoMethodError)

 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/api.rb:103:in
  
 `block in authorize'

 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/api.rb:102:in
  
 `each_pair'

 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/api.rb:102:in
  
 `authorize'


 Let me know if you need further information, i would like to find out the 
 possible reason for that error or if there is any error in our 
 configuration or code?

  

 Thank you in advance for your time,

 Georgi



-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 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.




Re: Oauth2 jwt ruby issue

2013-02-13 Thread hagay
Hi Daniel,

i added the :oauth2_prn authorization field but still instead of having 
the  NOT_ADS_USER problem   i now get:

Signet::AuthorizationError: Authorization failed.  Server message:
{
  error : access_denied
}

my configuration file looks like:

  :oauth2_keyfile: config/privatekey.p12
  :oauth2_issuer: ...6...@developer.gserviceaccount.com
  :oauth2_secret: notasecret
  :oauth2_prn: the email i log-in to my adwords account 
  :client_customer_id: adwords client_customer_id
  :developer_token: developer-Token

i cannot figure out what's wrong here,

Thanks in advanced for your help.
hagay.



On Monday, February 11, 2013 11:24:34 AM UTC+2, Danial Klimkin wrote:

 Hello Georgi,


 Yes, the new gem supports the additional :oauth2_prn authorization 
 field. You need to set it to the user login your application should 
 impersonate for the request.


 -Danial, AdWords API Team.


 On Friday, February 8, 2013 11:13:33 PM UTC+4, teamma...@gmail.com wrote:

 Hi Danial,

 I see there is a posted answer (
 http://code.google.com/p/google-api-ads-ruby/issues/detail?id=93) with 
 comment fixed. I've updated the gems to the latest versions but still 
 have the same error (AuthenticationError.NOT_ADS_USER).

 Is there anything else i should do?

 Thank you in advance,

 Best,
 Georgi

 On Wednesday, January 23, 2013 11:30:36 AM UTC+2, Danial Klimkin wrote:

 Hello Thomas, Richard,


 For Ruby, the library fails to pass PRN personalization email address. 
 As such, there is no way to identify which account you are authorizing 
 against. For Java, please create a new thread and library authors will get 
 back to you.

 Richard, please follow up on the bug, I'll update it once the fix is out.


 -Danial, AdWords API Team.


 On Friday, January 18, 2013 11:20:14 PM UTC+4, Thomas Heller wrote:

 Hi,

 I get the same NOT_ADS_USER error using the Java API Client.

 Any hints what exactly causes this? I'm trying with access the 
 CampaignService with a OAuth2 Service Account and all I get is 
 NOT_ADS_USER?

 Regards,
 Thomas Heller

 On Friday, January 18, 2013 10:21:52 AM UTC+1, Danial Klimkin wrote:

 Hello Georgi,


 I have to say it is a library bug. I've logged it and will look into 
 it soon:

   http://code.google.com/p/google-api-ads-ruby/issues/detail?id=93


 -Danial, AdWords API Team.



 On Thursday, January 17, 2013 1:30:58 PM UTC+4, teamma...@gmail.comwrote:

 Hi Danial,

 Just tried replacing the method with OAuth2_jwt and we are doing good 
 progress, because i think the authentication passed successfully. 

 I have the following error now: 
 soap:Envelope 
 xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;soap:HeaderResponseHeader
  
 xmlns=https://adwords.google.com/api/adwords/cm/v201209;requestId0004d3788a92a0600ae5630d276f/requestIdserviceNameCampaignService/serviceNamemethodNameget/methodNameoperations0/operationsresponseTime27/responseTimeunits0/units/ResponseHeader/soap:Headersoap:Bodysoap:Faultfaultcodesoap:Server/faultcodefaultstring[AuthenticationError.NOT_ADS_USER
  
 @ ; trigger:'lt;nullgt;']/faultstringdetailApiExceptionFault 
 xmlns=
 https://adwords.google.com/api/adwords/cm/v201209;message[AuthenticationError.NOT_ADS_USER
  
 @ ; 
 trigger:'lt;nullgt;']/messageApplicationException.TypeApiException/ApplicationException.Typeerrors
  
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
 xsi:type=AuthenticationErrorfieldPath/fieldPathtriggerlt;nullgt;/triggererrorStringAuthenticationError.NOT_ADS_USER/errorStringApiError.TypeAuthenticationError/ApiError.TypereasonNOT_ADS_USER/reason/errors/ApiExceptionFault/detail/soap:Fault/soap:Body/soap:Envelope

 Is there any chance to get this error because of the domain 
 administration rights - how can check and verify them (is this the 
 google 
 analytics domain owner verification)?

 Thank you in advance,

 All the best,
 Georgi

 On Thursday, January 17, 2013 11:18:11 AM UTC+2, Danial Klimkin wrote:

 Hello Georgi,


 From the stack trace I can see OAUTH2 method is used. You should use 
 OAUTH2_JWT instead. Please check this line in the configuration:

 :authentication = {
 :method: OAUTH2_JWT
 ...


 Not related to the issue below, but require for the next step. 
 Please make sure you are signed up for a domain and have domain 
 administration rights. This is a pre-requisite for using JWT 
 authorization.


 -Danial, AdWords API Team.


 On Wednesday, January 16, 2013 4:15:54 PM UTC+4, 
 teamma...@gmail.comwrote:

 Hi Danial,

 Thanks for the quick reply, we've replaced the adwords 
 initialization with the one you've suggested and we are having a 
 progress, 
 but still there is another error:

 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/auth/oauth2_handler.rb:116:in
  
 `validate_credentials': Client id is not included in the credentials. 
 (AdsCommon::Errors::AuthError)
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/auth/oauth2_handler.rb:148:in
  
 

Re: Oauth2 jwt ruby issue

2013-02-11 Thread Danial Klimkin
Hello Georgi,


Yes, the new gem supports the additional :oauth2_prn authorization field. 
You need to set it to the user login your application should impersonate 
for the request.


-Danial, AdWords API Team.


On Friday, February 8, 2013 11:13:33 PM UTC+4, teamma...@gmail.com wrote:

 Hi Danial,

 I see there is a posted answer (
 http://code.google.com/p/google-api-ads-ruby/issues/detail?id=93) with 
 comment fixed. I've updated the gems to the latest versions but still 
 have the same error (AuthenticationError.NOT_ADS_USER).

 Is there anything else i should do?

 Thank you in advance,

 Best,
 Georgi

 On Wednesday, January 23, 2013 11:30:36 AM UTC+2, Danial Klimkin wrote:

 Hello Thomas, Richard,


 For Ruby, the library fails to pass PRN personalization email address. As 
 such, there is no way to identify which account you are authorizing 
 against. For Java, please create a new thread and library authors will get 
 back to you.

 Richard, please follow up on the bug, I'll update it once the fix is out.


 -Danial, AdWords API Team.


 On Friday, January 18, 2013 11:20:14 PM UTC+4, Thomas Heller wrote:

 Hi,

 I get the same NOT_ADS_USER error using the Java API Client.

 Any hints what exactly causes this? I'm trying with access the 
 CampaignService with a OAuth2 Service Account and all I get is NOT_ADS_USER?

 Regards,
 Thomas Heller

 On Friday, January 18, 2013 10:21:52 AM UTC+1, Danial Klimkin wrote:

 Hello Georgi,


 I have to say it is a library bug. I've logged it and will look into it 
 soon:

   http://code.google.com/p/google-api-ads-ruby/issues/detail?id=93


 -Danial, AdWords API Team.



 On Thursday, January 17, 2013 1:30:58 PM UTC+4, teamma...@gmail.comwrote:

 Hi Danial,

 Just tried replacing the method with OAuth2_jwt and we are doing good 
 progress, because i think the authentication passed successfully. 

 I have the following error now: 
 soap:Envelope 
 xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;soap:HeaderResponseHeader
  
 xmlns=https://adwords.google.com/api/adwords/cm/v201209;requestId0004d3788a92a0600ae5630d276f/requestIdserviceNameCampaignService/serviceNamemethodNameget/methodNameoperations0/operationsresponseTime27/responseTimeunits0/units/ResponseHeader/soap:Headersoap:Bodysoap:Faultfaultcodesoap:Server/faultcodefaultstring[AuthenticationError.NOT_ADS_USER
  
 @ ; trigger:'lt;nullgt;']/faultstringdetailApiExceptionFault 
 xmlns=
 https://adwords.google.com/api/adwords/cm/v201209;message[AuthenticationError.NOT_ADS_USER
  
 @ ; 
 trigger:'lt;nullgt;']/messageApplicationException.TypeApiException/ApplicationException.Typeerrors
  
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
 xsi:type=AuthenticationErrorfieldPath/fieldPathtriggerlt;nullgt;/triggererrorStringAuthenticationError.NOT_ADS_USER/errorStringApiError.TypeAuthenticationError/ApiError.TypereasonNOT_ADS_USER/reason/errors/ApiExceptionFault/detail/soap:Fault/soap:Body/soap:Envelope

 Is there any chance to get this error because of the domain 
 administration rights - how can check and verify them (is this the google 
 analytics domain owner verification)?

 Thank you in advance,

 All the best,
 Georgi

 On Thursday, January 17, 2013 11:18:11 AM UTC+2, Danial Klimkin wrote:

 Hello Georgi,


 From the stack trace I can see OAUTH2 method is used. You should use 
 OAUTH2_JWT instead. Please check this line in the configuration:

 :authentication = {
 :method: OAUTH2_JWT
 ...


 Not related to the issue below, but require for the next step. Please 
 make sure you are signed up for a domain and have domain administration 
 rights. This is a pre-requisite for using JWT authorization.


 -Danial, AdWords API Team.


 On Wednesday, January 16, 2013 4:15:54 PM UTC+4, 
 teamma...@gmail.comwrote:

 Hi Danial,

 Thanks for the quick reply, we've replaced the adwords 
 initialization with the one you've suggested and we are having a 
 progress, 
 but still there is another error:

 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/auth/oauth2_handler.rb:116:in
  
 `validate_credentials': Client id is not included in the credentials. 
 (AdsCommon::Errors::AuthError)
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/auth/oauth2_handler.rb:148:in
  
 `create_token'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/auth/base_handler.rb:50:in
  
 `get_token'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/auth/oauth2_handler.rb:82:in
  
 `get_token'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/auth/oauth2_handler.rb:75:in
  
 `auth_string'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/savon_headers/oauth_header_handler.rb:45:in
  
 `generate_headers'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/savon_headers/base_header_handler.rb:75:in
  
 

Re: Oauth2 jwt ruby issue

2013-02-08 Thread teammailsync
Hi Danial,

I see there is a posted answer 
(http://code.google.com/p/google-api-ads-ruby/issues/detail?id=93) with 
comment fixed. I've updated the gems to the latest versions but still 
have the same error (AuthenticationError.NOT_ADS_USER).

Is there anything else i should do?

Thank you in advance,

Best,
Georgi

On Wednesday, January 23, 2013 11:30:36 AM UTC+2, Danial Klimkin wrote:

 Hello Thomas, Richard,


 For Ruby, the library fails to pass PRN personalization email address. As 
 such, there is no way to identify which account you are authorizing 
 against. For Java, please create a new thread and library authors will get 
 back to you.

 Richard, please follow up on the bug, I'll update it once the fix is out.


 -Danial, AdWords API Team.


 On Friday, January 18, 2013 11:20:14 PM UTC+4, Thomas Heller wrote:

 Hi,

 I get the same NOT_ADS_USER error using the Java API Client.

 Any hints what exactly causes this? I'm trying with access the 
 CampaignService with a OAuth2 Service Account and all I get is NOT_ADS_USER?

 Regards,
 Thomas Heller

 On Friday, January 18, 2013 10:21:52 AM UTC+1, Danial Klimkin wrote:

 Hello Georgi,


 I have to say it is a library bug. I've logged it and will look into it 
 soon:

   http://code.google.com/p/google-api-ads-ruby/issues/detail?id=93


 -Danial, AdWords API Team.



 On Thursday, January 17, 2013 1:30:58 PM UTC+4, teamma...@gmail.comwrote:

 Hi Danial,

 Just tried replacing the method with OAuth2_jwt and we are doing good 
 progress, because i think the authentication passed successfully. 

 I have the following error now: 
 soap:Envelope 
 xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;soap:HeaderResponseHeader
  
 xmlns=https://adwords.google.com/api/adwords/cm/v201209;requestId0004d3788a92a0600ae5630d276f/requestIdserviceNameCampaignService/serviceNamemethodNameget/methodNameoperations0/operationsresponseTime27/responseTimeunits0/units/ResponseHeader/soap:Headersoap:Bodysoap:Faultfaultcodesoap:Server/faultcodefaultstring[AuthenticationError.NOT_ADS_USER
  
 @ ; trigger:'lt;nullgt;']/faultstringdetailApiExceptionFault xmlns=
 https://adwords.google.com/api/adwords/cm/v201209;message[AuthenticationError.NOT_ADS_USER
  
 @ ; 
 trigger:'lt;nullgt;']/messageApplicationException.TypeApiException/ApplicationException.Typeerrors
  
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
 xsi:type=AuthenticationErrorfieldPath/fieldPathtriggerlt;nullgt;/triggererrorStringAuthenticationError.NOT_ADS_USER/errorStringApiError.TypeAuthenticationError/ApiError.TypereasonNOT_ADS_USER/reason/errors/ApiExceptionFault/detail/soap:Fault/soap:Body/soap:Envelope

 Is there any chance to get this error because of the domain 
 administration rights - how can check and verify them (is this the google 
 analytics domain owner verification)?

 Thank you in advance,

 All the best,
 Georgi

 On Thursday, January 17, 2013 11:18:11 AM UTC+2, Danial Klimkin wrote:

 Hello Georgi,


 From the stack trace I can see OAUTH2 method is used. You should use 
 OAUTH2_JWT instead. Please check this line in the configuration:

 :authentication = {
 :method: OAUTH2_JWT
 ...


 Not related to the issue below, but require for the next step. Please 
 make sure you are signed up for a domain and have domain administration 
 rights. This is a pre-requisite for using JWT authorization.


 -Danial, AdWords API Team.


 On Wednesday, January 16, 2013 4:15:54 PM UTC+4, teamma...@gmail.comwrote:

 Hi Danial,

 Thanks for the quick reply, we've replaced the adwords initialization 
 with the one you've suggested and we are having a progress, but still 
 there 
 is another error:

 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/auth/oauth2_handler.rb:116:in
  
 `validate_credentials': Client id is not included in the credentials. 
 (AdsCommon::Errors::AuthError)
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/auth/oauth2_handler.rb:148:in
  
 `create_token'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/auth/base_handler.rb:50:in
  
 `get_token'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/auth/oauth2_handler.rb:82:in
  
 `get_token'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/auth/oauth2_handler.rb:75:in
  
 `auth_string'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/savon_headers/oauth_header_handler.rb:45:in
  
 `generate_headers'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/savon_headers/base_header_handler.rb:75:in
  
 `prepare_request'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/savon_service.rb:103:in
  
 `block in execute_soap_request'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/savon-1.2.0/lib/savon/client.rb:129:in
  
 `yield_objects'
 from 
 

Re: Oauth2 jwt ruby issue

2013-01-23 Thread Danial Klimkin
Hello Thomas, Richard,


For Ruby, the library fails to pass PRN personalization email address. As 
such, there is no way to identify which account you are authorizing 
against. For Java, please create a new thread and library authors will get 
back to you.

Richard, please follow up on the bug, I'll update it once the fix is out.


-Danial, AdWords API Team.


On Friday, January 18, 2013 11:20:14 PM UTC+4, Thomas Heller wrote:

 Hi,

 I get the same NOT_ADS_USER error using the Java API Client.

 Any hints what exactly causes this? I'm trying with access the 
 CampaignService with a OAuth2 Service Account and all I get is NOT_ADS_USER?

 Regards,
 Thomas Heller

 On Friday, January 18, 2013 10:21:52 AM UTC+1, Danial Klimkin wrote:

 Hello Georgi,


 I have to say it is a library bug. I've logged it and will look into it 
 soon:

   http://code.google.com/p/google-api-ads-ruby/issues/detail?id=93


 -Danial, AdWords API Team.



 On Thursday, January 17, 2013 1:30:58 PM UTC+4, teamma...@gmail.comwrote:

 Hi Danial,

 Just tried replacing the method with OAuth2_jwt and we are doing good 
 progress, because i think the authentication passed successfully. 

 I have the following error now: 
 soap:Envelope 
 xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;soap:HeaderResponseHeader
  
 xmlns=https://adwords.google.com/api/adwords/cm/v201209;requestId0004d3788a92a0600ae5630d276f/requestIdserviceNameCampaignService/serviceNamemethodNameget/methodNameoperations0/operationsresponseTime27/responseTimeunits0/units/ResponseHeader/soap:Headersoap:Bodysoap:Faultfaultcodesoap:Server/faultcodefaultstring[AuthenticationError.NOT_ADS_USER
  
 @ ; trigger:'lt;nullgt;']/faultstringdetailApiExceptionFault xmlns=
 https://adwords.google.com/api/adwords/cm/v201209;message[AuthenticationError.NOT_ADS_USER
  
 @ ; 
 trigger:'lt;nullgt;']/messageApplicationException.TypeApiException/ApplicationException.Typeerrors
  
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
 xsi:type=AuthenticationErrorfieldPath/fieldPathtriggerlt;nullgt;/triggererrorStringAuthenticationError.NOT_ADS_USER/errorStringApiError.TypeAuthenticationError/ApiError.TypereasonNOT_ADS_USER/reason/errors/ApiExceptionFault/detail/soap:Fault/soap:Body/soap:Envelope

 Is there any chance to get this error because of the domain 
 administration rights - how can check and verify them (is this the google 
 analytics domain owner verification)?

 Thank you in advance,

 All the best,
 Georgi

 On Thursday, January 17, 2013 11:18:11 AM UTC+2, Danial Klimkin wrote:

 Hello Georgi,


 From the stack trace I can see OAUTH2 method is used. You should use 
 OAUTH2_JWT instead. Please check this line in the configuration:

 :authentication = {
 :method: OAUTH2_JWT
 ...


 Not related to the issue below, but require for the next step. Please 
 make sure you are signed up for a domain and have domain administration 
 rights. This is a pre-requisite for using JWT authorization.


 -Danial, AdWords API Team.


 On Wednesday, January 16, 2013 4:15:54 PM UTC+4, teamma...@gmail.comwrote:

 Hi Danial,

 Thanks for the quick reply, we've replaced the adwords initialization 
 with the one you've suggested and we are having a progress, but still 
 there 
 is another error:

 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/auth/oauth2_handler.rb:116:in
  
 `validate_credentials': Client id is not included in the credentials. 
 (AdsCommon::Errors::AuthError)
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/auth/oauth2_handler.rb:148:in
  
 `create_token'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/auth/base_handler.rb:50:in
  
 `get_token'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/auth/oauth2_handler.rb:82:in
  
 `get_token'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/auth/oauth2_handler.rb:75:in
  
 `auth_string'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/savon_headers/oauth_header_handler.rb:45:in
  
 `generate_headers'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/savon_headers/base_header_handler.rb:75:in
  
 `prepare_request'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/savon_service.rb:103:in
  
 `block in execute_soap_request'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/savon-1.2.0/lib/savon/client.rb:129:in
  
 `yield_objects'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/savon-1.2.0/lib/savon/client.rb:122:in
  
 `process'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/savon-1.2.0/lib/savon/client.rb:84:in
  
 `block in request'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/savon-1.2.0/lib/savon/soap/request_builder.rb:56:in
  
 `call'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/savon-1.2.0/lib/savon/soap/request_builder.rb:56:in
  
 `request'
 from 
 

Re: Oauth2 jwt ruby issue

2013-01-21 Thread teammailsync
Hey guys,

Any update on this?

Thanks,
Georgi

On Friday, January 18, 2013 9:20:14 PM UTC+2, Thomas Heller wrote:

 Hi,

 I get the same NOT_ADS_USER error using the Java API Client.

 Any hints what exactly causes this? I'm trying with access the 
 CampaignService with a OAuth2 Service Account and all I get is NOT_ADS_USER?

 Regards,
 Thomas Heller

 On Friday, January 18, 2013 10:21:52 AM UTC+1, Danial Klimkin wrote:

 Hello Georgi,


 I have to say it is a library bug. I've logged it and will look into it 
 soon:

   http://code.google.com/p/google-api-ads-ruby/issues/detail?id=93


 -Danial, AdWords API Team.



 On Thursday, January 17, 2013 1:30:58 PM UTC+4, teamma...@gmail.comwrote:

 Hi Danial,

 Just tried replacing the method with OAuth2_jwt and we are doing good 
 progress, because i think the authentication passed successfully. 

 I have the following error now: 
 soap:Envelope 
 xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;soap:HeaderResponseHeader
  
 xmlns=https://adwords.google.com/api/adwords/cm/v201209;requestId0004d3788a92a0600ae5630d276f/requestIdserviceNameCampaignService/serviceNamemethodNameget/methodNameoperations0/operationsresponseTime27/responseTimeunits0/units/ResponseHeader/soap:Headersoap:Bodysoap:Faultfaultcodesoap:Server/faultcodefaultstring[AuthenticationError.NOT_ADS_USER
  
 @ ; trigger:'lt;nullgt;']/faultstringdetailApiExceptionFault xmlns=
 https://adwords.google.com/api/adwords/cm/v201209;message[AuthenticationError.NOT_ADS_USER
  
 @ ; 
 trigger:'lt;nullgt;']/messageApplicationException.TypeApiException/ApplicationException.Typeerrors
  
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
 xsi:type=AuthenticationErrorfieldPath/fieldPathtriggerlt;nullgt;/triggererrorStringAuthenticationError.NOT_ADS_USER/errorStringApiError.TypeAuthenticationError/ApiError.TypereasonNOT_ADS_USER/reason/errors/ApiExceptionFault/detail/soap:Fault/soap:Body/soap:Envelope

 Is there any chance to get this error because of the domain 
 administration rights - how can check and verify them (is this the google 
 analytics domain owner verification)?

 Thank you in advance,

 All the best,
 Georgi

 On Thursday, January 17, 2013 11:18:11 AM UTC+2, Danial Klimkin wrote:

 Hello Georgi,


 From the stack trace I can see OAUTH2 method is used. You should use 
 OAUTH2_JWT instead. Please check this line in the configuration:

 :authentication = {
 :method: OAUTH2_JWT
 ...


 Not related to the issue below, but require for the next step. Please 
 make sure you are signed up for a domain and have domain administration 
 rights. This is a pre-requisite for using JWT authorization.


 -Danial, AdWords API Team.


 On Wednesday, January 16, 2013 4:15:54 PM UTC+4, teamma...@gmail.comwrote:

 Hi Danial,

 Thanks for the quick reply, we've replaced the adwords initialization 
 with the one you've suggested and we are having a progress, but still 
 there 
 is another error:

 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/auth/oauth2_handler.rb:116:in
  
 `validate_credentials': Client id is not included in the credentials. 
 (AdsCommon::Errors::AuthError)
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/auth/oauth2_handler.rb:148:in
  
 `create_token'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/auth/base_handler.rb:50:in
  
 `get_token'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/auth/oauth2_handler.rb:82:in
  
 `get_token'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/auth/oauth2_handler.rb:75:in
  
 `auth_string'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/savon_headers/oauth_header_handler.rb:45:in
  
 `generate_headers'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/savon_headers/base_header_handler.rb:75:in
  
 `prepare_request'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/savon_service.rb:103:in
  
 `block in execute_soap_request'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/savon-1.2.0/lib/savon/client.rb:129:in
  
 `yield_objects'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/savon-1.2.0/lib/savon/client.rb:122:in
  
 `process'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/savon-1.2.0/lib/savon/client.rb:84:in
  
 `block in request'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/savon-1.2.0/lib/savon/soap/request_builder.rb:56:in
  
 `call'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/savon-1.2.0/lib/savon/soap/request_builder.rb:56:in
  
 `request'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/savon-1.2.0/lib/savon/client.rb:86:in
  
 `request'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/savon_service.rb:101:in
  
 `execute_soap_request'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/savon_service.rb:81:in
  
 

Re: Oauth2 jwt ruby issue

2013-01-21 Thread richard . worrall
I'm also seeing this issue with the Ruby client. If there's any workaround 
that'd be really handy to know.

Cheers!
Richard


On Friday, 18 January 2013 19:20:14 UTC, Thomas Heller wrote:

 Hi,

 I get the same NOT_ADS_USER error using the Java API Client.

 Any hints what exactly causes this? I'm trying with access the 
 CampaignService with a OAuth2 Service Account and all I get is NOT_ADS_USER?

 Regards,
 Thomas Heller

 On Friday, January 18, 2013 10:21:52 AM UTC+1, Danial Klimkin wrote:

 Hello Georgi,


 I have to say it is a library bug. I've logged it and will look into it 
 soon:

   http://code.google.com/p/google-api-ads-ruby/issues/detail?id=93


 -Danial, AdWords API Team.



 On Thursday, January 17, 2013 1:30:58 PM UTC+4, teamma...@gmail.comwrote:

 Hi Danial,

 Just tried replacing the method with OAuth2_jwt and we are doing good 
 progress, because i think the authentication passed successfully. 

 I have the following error now: 
 soap:Envelope 
 xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;soap:HeaderResponseHeader
  
 xmlns=https://adwords.google.com/api/adwords/cm/v201209;requestId0004d3788a92a0600ae5630d276f/requestIdserviceNameCampaignService/serviceNamemethodNameget/methodNameoperations0/operationsresponseTime27/responseTimeunits0/units/ResponseHeader/soap:Headersoap:Bodysoap:Faultfaultcodesoap:Server/faultcodefaultstring[AuthenticationError.NOT_ADS_USER
  
 @ ; trigger:'lt;nullgt;']/faultstringdetailApiExceptionFault xmlns=
 https://adwords.google.com/api/adwords/cm/v201209;message[AuthenticationError.NOT_ADS_USER
  
 @ ; 
 trigger:'lt;nullgt;']/messageApplicationException.TypeApiException/ApplicationException.Typeerrors
  
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
 xsi:type=AuthenticationErrorfieldPath/fieldPathtriggerlt;nullgt;/triggererrorStringAuthenticationError.NOT_ADS_USER/errorStringApiError.TypeAuthenticationError/ApiError.TypereasonNOT_ADS_USER/reason/errors/ApiExceptionFault/detail/soap:Fault/soap:Body/soap:Envelope

 Is there any chance to get this error because of the domain 
 administration rights - how can check and verify them (is this the google 
 analytics domain owner verification)?

 Thank you in advance,

 All the best,
 Georgi

 On Thursday, January 17, 2013 11:18:11 AM UTC+2, Danial Klimkin wrote:

 Hello Georgi,


 From the stack trace I can see OAUTH2 method is used. You should use 
 OAUTH2_JWT instead. Please check this line in the configuration:

 :authentication = {
 :method: OAUTH2_JWT
 ...


 Not related to the issue below, but require for the next step. Please 
 make sure you are signed up for a domain and have domain administration 
 rights. This is a pre-requisite for using JWT authorization.


 -Danial, AdWords API Team.


 On Wednesday, January 16, 2013 4:15:54 PM UTC+4, teamma...@gmail.comwrote:

 Hi Danial,

 Thanks for the quick reply, we've replaced the adwords initialization 
 with the one you've suggested and we are having a progress, but still 
 there 
 is another error:

 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/auth/oauth2_handler.rb:116:in
  
 `validate_credentials': Client id is not included in the credentials. 
 (AdsCommon::Errors::AuthError)
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/auth/oauth2_handler.rb:148:in
  
 `create_token'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/auth/base_handler.rb:50:in
  
 `get_token'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/auth/oauth2_handler.rb:82:in
  
 `get_token'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/auth/oauth2_handler.rb:75:in
  
 `auth_string'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/savon_headers/oauth_header_handler.rb:45:in
  
 `generate_headers'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/savon_headers/base_header_handler.rb:75:in
  
 `prepare_request'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/savon_service.rb:103:in
  
 `block in execute_soap_request'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/savon-1.2.0/lib/savon/client.rb:129:in
  
 `yield_objects'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/savon-1.2.0/lib/savon/client.rb:122:in
  
 `process'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/savon-1.2.0/lib/savon/client.rb:84:in
  
 `block in request'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/savon-1.2.0/lib/savon/soap/request_builder.rb:56:in
  
 `call'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/savon-1.2.0/lib/savon/soap/request_builder.rb:56:in
  
 `request'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/savon-1.2.0/lib/savon/client.rb:86:in
  
 `request'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/savon_service.rb:101:in
  
 `execute_soap_request'
 from 
 

Re: Oauth2 jwt ruby issue

2013-01-20 Thread Thomas Heller
Hi,

I get the same NOT_ADS_USER error using the Java API Client.

Any hints what exactly causes this? I'm trying with access the 
CampaignService with a OAuth2 Service Account and all I get is NOT_ADS_USER?

Regards,
Thomas Heller

On Friday, January 18, 2013 10:21:52 AM UTC+1, Danial Klimkin wrote:

 Hello Georgi,


 I have to say it is a library bug. I've logged it and will look into it 
 soon:

   http://code.google.com/p/google-api-ads-ruby/issues/detail?id=93


 -Danial, AdWords API Team.



 On Thursday, January 17, 2013 1:30:58 PM UTC+4, teamma...@gmail.com wrote:

 Hi Danial,

 Just tried replacing the method with OAuth2_jwt and we are doing good 
 progress, because i think the authentication passed successfully. 

 I have the following error now: 
 soap:Envelope 
 xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;soap:HeaderResponseHeader
  
 xmlns=https://adwords.google.com/api/adwords/cm/v201209;requestId0004d3788a92a0600ae5630d276f/requestIdserviceNameCampaignService/serviceNamemethodNameget/methodNameoperations0/operationsresponseTime27/responseTimeunits0/units/ResponseHeader/soap:Headersoap:Bodysoap:Faultfaultcodesoap:Server/faultcodefaultstring[AuthenticationError.NOT_ADS_USER
  
 @ ; trigger:'lt;nullgt;']/faultstringdetailApiExceptionFault xmlns=
 https://adwords.google.com/api/adwords/cm/v201209;message[AuthenticationError.NOT_ADS_USER
  
 @ ; 
 trigger:'lt;nullgt;']/messageApplicationException.TypeApiException/ApplicationException.Typeerrors
  
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
 xsi:type=AuthenticationErrorfieldPath/fieldPathtriggerlt;nullgt;/triggererrorStringAuthenticationError.NOT_ADS_USER/errorStringApiError.TypeAuthenticationError/ApiError.TypereasonNOT_ADS_USER/reason/errors/ApiExceptionFault/detail/soap:Fault/soap:Body/soap:Envelope

 Is there any chance to get this error because of the domain 
 administration rights - how can check and verify them (is this the google 
 analytics domain owner verification)?

 Thank you in advance,

 All the best,
 Georgi

 On Thursday, January 17, 2013 11:18:11 AM UTC+2, Danial Klimkin wrote:

 Hello Georgi,


 From the stack trace I can see OAUTH2 method is used. You should use 
 OAUTH2_JWT instead. Please check this line in the configuration:

 :authentication = {
 :method: OAUTH2_JWT
 ...


 Not related to the issue below, but require for the next step. Please 
 make sure you are signed up for a domain and have domain administration 
 rights. This is a pre-requisite for using JWT authorization.


 -Danial, AdWords API Team.


 On Wednesday, January 16, 2013 4:15:54 PM UTC+4, teamma...@gmail.comwrote:

 Hi Danial,

 Thanks for the quick reply, we've replaced the adwords initialization 
 with the one you've suggested and we are having a progress, but still 
 there 
 is another error:

 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/auth/oauth2_handler.rb:116:in
  
 `validate_credentials': Client id is not included in the credentials. 
 (AdsCommon::Errors::AuthError)
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/auth/oauth2_handler.rb:148:in
  
 `create_token'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/auth/base_handler.rb:50:in
  
 `get_token'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/auth/oauth2_handler.rb:82:in
  
 `get_token'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/auth/oauth2_handler.rb:75:in
  
 `auth_string'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/savon_headers/oauth_header_handler.rb:45:in
  
 `generate_headers'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/savon_headers/base_header_handler.rb:75:in
  
 `prepare_request'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/savon_service.rb:103:in
  
 `block in execute_soap_request'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/savon-1.2.0/lib/savon/client.rb:129:in
  
 `yield_objects'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/savon-1.2.0/lib/savon/client.rb:122:in
  
 `process'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/savon-1.2.0/lib/savon/client.rb:84:in 
 `block in request'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/savon-1.2.0/lib/savon/soap/request_builder.rb:56:in
  
 `call'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/savon-1.2.0/lib/savon/soap/request_builder.rb:56:in
  
 `request'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/savon-1.2.0/lib/savon/client.rb:86:in 
 `request'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/savon_service.rb:101:in
  
 `execute_soap_request'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/savon_service.rb:81:in
  
 `execute_action'
 from 
 

Re: Oauth2 jwt ruby issue

2013-01-18 Thread Danial Klimkin
Hello Georgi,


I have to say it is a library bug. I've logged it and will look into it 
soon:

  http://code.google.com/p/google-api-ads-ruby/issues/detail?id=93


-Danial, AdWords API Team.



On Thursday, January 17, 2013 1:30:58 PM UTC+4, teamma...@gmail.com wrote:

 Hi Danial,

 Just tried replacing the method with OAuth2_jwt and we are doing good 
 progress, because i think the authentication passed successfully. 

 I have the following error now: 
 soap:Envelope 
 xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;soap:HeaderResponseHeader
  
 xmlns=https://adwords.google.com/api/adwords/cm/v201209;requestId0004d3788a92a0600ae5630d276f/requestIdserviceNameCampaignService/serviceNamemethodNameget/methodNameoperations0/operationsresponseTime27/responseTimeunits0/units/ResponseHeader/soap:Headersoap:Bodysoap:Faultfaultcodesoap:Server/faultcodefaultstring[AuthenticationError.NOT_ADS_USER
  
 @ ; trigger:'lt;nullgt;']/faultstringdetailApiExceptionFault xmlns=
 https://adwords.google.com/api/adwords/cm/v201209;message[AuthenticationError.NOT_ADS_USER
  
 @ ; 
 trigger:'lt;nullgt;']/messageApplicationException.TypeApiException/ApplicationException.Typeerrors
  
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
 xsi:type=AuthenticationErrorfieldPath/fieldPathtriggerlt;nullgt;/triggererrorStringAuthenticationError.NOT_ADS_USER/errorStringApiError.TypeAuthenticationError/ApiError.TypereasonNOT_ADS_USER/reason/errors/ApiExceptionFault/detail/soap:Fault/soap:Body/soap:Envelope

 Is there any chance to get this error because of the domain administration 
 rights - how can check and verify them (is this the google analytics domain 
 owner verification)?

 Thank you in advance,

 All the best,
 Georgi

 On Thursday, January 17, 2013 11:18:11 AM UTC+2, Danial Klimkin wrote:

 Hello Georgi,


 From the stack trace I can see OAUTH2 method is used. You should use 
 OAUTH2_JWT instead. Please check this line in the configuration:

 :authentication = {
 :method: OAUTH2_JWT
 ...


 Not related to the issue below, but require for the next step. Please 
 make sure you are signed up for a domain and have domain administration 
 rights. This is a pre-requisite for using JWT authorization.


 -Danial, AdWords API Team.


 On Wednesday, January 16, 2013 4:15:54 PM UTC+4, teamma...@gmail.comwrote:

 Hi Danial,

 Thanks for the quick reply, we've replaced the adwords initialization 
 with the one you've suggested and we are having a progress, but still there 
 is another error:

 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/auth/oauth2_handler.rb:116:in
  
 `validate_credentials': Client id is not included in the credentials. 
 (AdsCommon::Errors::AuthError)
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/auth/oauth2_handler.rb:148:in
  
 `create_token'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/auth/base_handler.rb:50:in
  
 `get_token'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/auth/oauth2_handler.rb:82:in
  
 `get_token'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/auth/oauth2_handler.rb:75:in
  
 `auth_string'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/savon_headers/oauth_header_handler.rb:45:in
  
 `generate_headers'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/savon_headers/base_header_handler.rb:75:in
  
 `prepare_request'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/savon_service.rb:103:in
  
 `block in execute_soap_request'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/savon-1.2.0/lib/savon/client.rb:129:in 
 `yield_objects'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/savon-1.2.0/lib/savon/client.rb:122:in 
 `process'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/savon-1.2.0/lib/savon/client.rb:84:in 
 `block in request'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/savon-1.2.0/lib/savon/soap/request_builder.rb:56:in
  
 `call'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/savon-1.2.0/lib/savon/soap/request_builder.rb:56:in
  
 `request'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/savon-1.2.0/lib/savon/client.rb:86:in 
 `request'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/savon_service.rb:101:in
  
 `execute_soap_request'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/savon_service.rb:81:in
  
 `execute_action'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-adwords-api-0.8.0/lib/adwords_api/v201209/campaign_service.rb:21:in
  
 `get'

 The application now requires client id. We've tried to add 
 :oauth2_client_id and the :oauth2_client_secret (didn't work either), but 
 i'm not sure if this is the right direction.

 Let me know if you need further information,

 All the best,
 Georgi

 On Tuesday, January 15, 2013 2:04:53 

Re: Oauth2 jwt ruby issue

2013-01-18 Thread teammailsync
I see, thank you for the support, what are the available workarounds?

Best,
Georgi

On Friday, January 18, 2013 11:21:52 AM UTC+2, Danial Klimkin wrote:

 Hello Georgi,


 I have to say it is a library bug. I've logged it and will look into it 
 soon:

   http://code.google.com/p/google-api-ads-ruby/issues/detail?id=93


 -Danial, AdWords API Team.



 On Thursday, January 17, 2013 1:30:58 PM UTC+4, teamma...@gmail.com wrote:

 Hi Danial,

 Just tried replacing the method with OAuth2_jwt and we are doing good 
 progress, because i think the authentication passed successfully. 

 I have the following error now: 
 soap:Envelope 
 xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;soap:HeaderResponseHeader
  
 xmlns=https://adwords.google.com/api/adwords/cm/v201209;requestId0004d3788a92a0600ae5630d276f/requestIdserviceNameCampaignService/serviceNamemethodNameget/methodNameoperations0/operationsresponseTime27/responseTimeunits0/units/ResponseHeader/soap:Headersoap:Bodysoap:Faultfaultcodesoap:Server/faultcodefaultstring[AuthenticationError.NOT_ADS_USER
  
 @ ; trigger:'lt;nullgt;']/faultstringdetailApiExceptionFault xmlns=
 https://adwords.google.com/api/adwords/cm/v201209;message[AuthenticationError.NOT_ADS_USER
  
 @ ; 
 trigger:'lt;nullgt;']/messageApplicationException.TypeApiException/ApplicationException.Typeerrors
  
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
 xsi:type=AuthenticationErrorfieldPath/fieldPathtriggerlt;nullgt;/triggererrorStringAuthenticationError.NOT_ADS_USER/errorStringApiError.TypeAuthenticationError/ApiError.TypereasonNOT_ADS_USER/reason/errors/ApiExceptionFault/detail/soap:Fault/soap:Body/soap:Envelope

 Is there any chance to get this error because of the domain 
 administration rights - how can check and verify them (is this the google 
 analytics domain owner verification)?

 Thank you in advance,

 All the best,
 Georgi

 On Thursday, January 17, 2013 11:18:11 AM UTC+2, Danial Klimkin wrote:

 Hello Georgi,


 From the stack trace I can see OAUTH2 method is used. You should use 
 OAUTH2_JWT instead. Please check this line in the configuration:

 :authentication = {
 :method: OAUTH2_JWT
 ...


 Not related to the issue below, but require for the next step. Please 
 make sure you are signed up for a domain and have domain administration 
 rights. This is a pre-requisite for using JWT authorization.


 -Danial, AdWords API Team.


 On Wednesday, January 16, 2013 4:15:54 PM UTC+4, teamma...@gmail.comwrote:

 Hi Danial,

 Thanks for the quick reply, we've replaced the adwords initialization 
 with the one you've suggested and we are having a progress, but still 
 there 
 is another error:

 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/auth/oauth2_handler.rb:116:in
  
 `validate_credentials': Client id is not included in the credentials. 
 (AdsCommon::Errors::AuthError)
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/auth/oauth2_handler.rb:148:in
  
 `create_token'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/auth/base_handler.rb:50:in
  
 `get_token'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/auth/oauth2_handler.rb:82:in
  
 `get_token'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/auth/oauth2_handler.rb:75:in
  
 `auth_string'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/savon_headers/oauth_header_handler.rb:45:in
  
 `generate_headers'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/savon_headers/base_header_handler.rb:75:in
  
 `prepare_request'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/savon_service.rb:103:in
  
 `block in execute_soap_request'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/savon-1.2.0/lib/savon/client.rb:129:in
  
 `yield_objects'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/savon-1.2.0/lib/savon/client.rb:122:in
  
 `process'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/savon-1.2.0/lib/savon/client.rb:84:in 
 `block in request'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/savon-1.2.0/lib/savon/soap/request_builder.rb:56:in
  
 `call'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/savon-1.2.0/lib/savon/soap/request_builder.rb:56:in
  
 `request'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/savon-1.2.0/lib/savon/client.rb:86:in 
 `request'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/savon_service.rb:101:in
  
 `execute_soap_request'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/savon_service.rb:81:in
  
 `execute_action'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-adwords-api-0.8.0/lib/adwords_api/v201209/campaign_service.rb:21:in
  
 `get'

 The application now requires client id. We've tried to add 
 :oauth2_client_id and the :oauth2_client_secret (didn't work 

Re: Oauth2 jwt ruby issue

2013-01-17 Thread Danial Klimkin
Hello Georgi,


From the stack trace I can see OAUTH2 method is used. You should use 
OAUTH2_JWT instead. Please check this line in the configuration:

:authentication = {
:method: OAUTH2_JWT
...


Not related to the issue below, but require for the next step. Please make 
sure you are signed up for a domain and have domain administration rights. 
This is a pre-requisite for using JWT authorization.


-Danial, AdWords API Team.


On Wednesday, January 16, 2013 4:15:54 PM UTC+4, teamma...@gmail.com wrote:

 Hi Danial,

 Thanks for the quick reply, we've replaced the adwords initialization with 
 the one you've suggested and we are having a progress, but still there is 
 another error:

 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/auth/oauth2_handler.rb:116:in
  
 `validate_credentials': Client id is not included in the credentials. 
 (AdsCommon::Errors::AuthError)
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/auth/oauth2_handler.rb:148:in
  
 `create_token'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/auth/base_handler.rb:50:in
  
 `get_token'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/auth/oauth2_handler.rb:82:in
  
 `get_token'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/auth/oauth2_handler.rb:75:in
  
 `auth_string'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/savon_headers/oauth_header_handler.rb:45:in
  
 `generate_headers'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/savon_headers/base_header_handler.rb:75:in
  
 `prepare_request'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/savon_service.rb:103:in
  
 `block in execute_soap_request'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/savon-1.2.0/lib/savon/client.rb:129:in 
 `yield_objects'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/savon-1.2.0/lib/savon/client.rb:122:in 
 `process'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/savon-1.2.0/lib/savon/client.rb:84:in 
 `block in request'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/savon-1.2.0/lib/savon/soap/request_builder.rb:56:in
  
 `call'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/savon-1.2.0/lib/savon/soap/request_builder.rb:56:in
  
 `request'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/savon-1.2.0/lib/savon/client.rb:86:in 
 `request'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/savon_service.rb:101:in
  
 `execute_soap_request'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/savon_service.rb:81:in
  
 `execute_action'
 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-adwords-api-0.8.0/lib/adwords_api/v201209/campaign_service.rb:21:in
  
 `get'

 The application now requires client id. We've tried to add 
 :oauth2_client_id and the :oauth2_client_secret (didn't work either), but 
 i'm not sure if this is the right direction.

 Let me know if you need further information,

 All the best,
 Georgi

 On Tuesday, January 15, 2013 2:04:53 PM UTC+2, Danial Klimkin wrote:

 Hello Georgi,


 If you initialize the library with a hash, you need to make sure to 
 provide all required credentials. Make sure to include all required fields 
 like this:

 adwords = AdwordsApi::Api.new({
   :service = {
 :environment = :PRODUCTION
   },
   :library = {
 :log_level = DEBUG
   },
   :authentication = {
 :method: OAUTH2_JWT
 :oauth2_issuer: '12345...@developer.gserviceaccount.com'
 :oauth2_secret: 'key_secret'
 :oauth2_keyfile: '/path/to/key.p12'
 :developer_token: 'dev_token',
 :client_customer_id: '123-456-7890'
   }
 }) 


 -Danial, AdWords API Team.

 On Monday, January 14, 2013 4:05:36 PM UTC+4, teamma...@gmail.com wrote:

 Hello everyone, 

 We’ve recently started to use adwords api and now we are trying to 
 automate few tasks. We’re using OAuth2 authentication and ruby. 

 We’ve followed the example here 
 https://code.google.com/p/google-api-ads-ruby/source/browse/adwords_api/examples/v201209/misc/use_oauth2_jwt.rbhttps://code.google.com/p/google-api-ads-ruby/source/browse/adwords_api/examples/v201209/misc/use_oauth2.rbto
  authenticate, the only difference is how we initialize the adwords api:

 adwords = AdwordsApi::Api.new({

 :library = {

   :log_level = DEBUG

 }}) 

 # option 1 and option 2 not modified from the example

 campaign_srv = adwords.service(:CampaignService, API_VERSION)


 We’ve downloaded the private key file and the path is set correctly and 
 we’ve tried both options. This is the error we get: 

 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/credential_handler.rb:65:in
  
 `set_credential': undefined method `[]=' for nil:NilClass (NoMethodError)

 from 
 

Re: Oauth2 jwt ruby issue

2013-01-16 Thread teammailsync
Hi Danial,

Thanks for the quick reply, we've replaced the adwords initialization with 
the one you've suggested and we are having a progress, but still there is 
another error:

/path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/auth/oauth2_handler.rb:116:in
 
`validate_credentials': Client id is not included in the credentials. 
(AdsCommon::Errors::AuthError)
from 
/path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/auth/oauth2_handler.rb:148:in
 
`create_token'
from 
/path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/auth/base_handler.rb:50:in
 
`get_token'
from 
/path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/auth/oauth2_handler.rb:82:in
 
`get_token'
from 
/path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/auth/oauth2_handler.rb:75:in
 
`auth_string'
from 
/path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/savon_headers/oauth_header_handler.rb:45:in
 
`generate_headers'
from 
/path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/savon_headers/base_header_handler.rb:75:in
 
`prepare_request'
from 
/path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/savon_service.rb:103:in
 
`block in execute_soap_request'
from 
/path/.rvm/gems/ruby-1.9.3-p327/gems/savon-1.2.0/lib/savon/client.rb:129:in 
`yield_objects'
from 
/path/.rvm/gems/ruby-1.9.3-p327/gems/savon-1.2.0/lib/savon/client.rb:122:in 
`process'
from 
/path/.rvm/gems/ruby-1.9.3-p327/gems/savon-1.2.0/lib/savon/client.rb:84:in 
`block in request'
from 
/path/.rvm/gems/ruby-1.9.3-p327/gems/savon-1.2.0/lib/savon/soap/request_builder.rb:56:in
 
`call'
from 
/path/.rvm/gems/ruby-1.9.3-p327/gems/savon-1.2.0/lib/savon/soap/request_builder.rb:56:in
 
`request'
from 
/path/.rvm/gems/ruby-1.9.3-p327/gems/savon-1.2.0/lib/savon/client.rb:86:in 
`request'
from 
/path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/savon_service.rb:101:in
 
`execute_soap_request'
from 
/path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/savon_service.rb:81:in
 
`execute_action'
from 
/path/.rvm/gems/ruby-1.9.3-p327/gems/google-adwords-api-0.8.0/lib/adwords_api/v201209/campaign_service.rb:21:in
 
`get'

The application now requires client id. We've tried to add 
:oauth2_client_id and the :oauth2_client_secret (didn't work either), but 
i'm not sure if this is the right direction.

Let me know if you need further information,

All the best,
Georgi

On Tuesday, January 15, 2013 2:04:53 PM UTC+2, Danial Klimkin wrote:

 Hello Georgi,


 If you initialize the library with a hash, you need to make sure to 
 provide all required credentials. Make sure to include all required fields 
 like this:

 adwords = AdwordsApi::Api.new({
   :service = {
 :environment = :PRODUCTION
   },
   :library = {
 :log_level = DEBUG
   },
   :authentication = {
 :method: OAUTH2_JWT
 :oauth2_issuer: '12345...@developer.gserviceaccount.com javascript:'
 :oauth2_secret: 'key_secret'
 :oauth2_keyfile: '/path/to/key.p12'
 :developer_token: 'dev_token',
 :client_customer_id: '123-456-7890'
   }
 }) 


 -Danial, AdWords API Team.

 On Monday, January 14, 2013 4:05:36 PM UTC+4, teamma...@gmail.com wrote:

 Hello everyone, 

 We’ve recently started to use adwords api and now we are trying to 
 automate few tasks. We’re using OAuth2 authentication and ruby. 

 We’ve followed the example here 
 https://code.google.com/p/google-api-ads-ruby/source/browse/adwords_api/examples/v201209/misc/use_oauth2_jwt.rbhttps://code.google.com/p/google-api-ads-ruby/source/browse/adwords_api/examples/v201209/misc/use_oauth2.rbto
  authenticate, the only difference is how we initialize the adwords api:

 adwords = AdwordsApi::Api.new({

 :library = {

   :log_level = DEBUG

 }}) 

 # option 1 and option 2 not modified from the example

 campaign_srv = adwords.service(:CampaignService, API_VERSION)


 We’ve downloaded the private key file and the path is set correctly and 
 we’ve tried both options. This is the error we get: 

 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/credential_handler.rb:65:in
  
 `set_credential': undefined method `[]=' for nil:NilClass (NoMethodError)

 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/api.rb:103:in
  
 `block in authorize'

 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/api.rb:102:in
  
 `each_pair'

 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/api.rb:102:in
  
 `authorize'


 Let me know if you need further information, i would like to find out the 
 possible reason for that error or if there is any error in our 
 configuration or code?

  

 Thank you in advance for your time,

 Georgi



-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and 

Re: Oauth2 jwt ruby issue

2013-01-15 Thread Danial Klimkin
Hello Georgi,


If you initialize the library with a hash, you need to make sure to provide 
all required credentials. Make sure to include all required fields like 
this:

adwords = AdwordsApi::Api.new({
  :service = {
:environment = :PRODUCTION
  },
  :library = {
:log_level = DEBUG
  },
  :authentication = {
:method: OAUTH2_JWT
:oauth2_issuer: '1234567...@developer.gserviceaccount.com'
:oauth2_secret: 'key_secret'
:oauth2_keyfile: '/path/to/key.p12'
:developer_token: 'dev_token',
:client_customer_id: '123-456-7890'
  }
}) 


-Danial, AdWords API Team.

On Monday, January 14, 2013 4:05:36 PM UTC+4, teamma...@gmail.com wrote:

 Hello everyone, 

 We’ve recently started to use adwords api and now we are trying to 
 automate few tasks. We’re using OAuth2 authentication and ruby. 

 We’ve followed the example here 
 https://code.google.com/p/google-api-ads-ruby/source/browse/adwords_api/examples/v201209/misc/use_oauth2_jwt.rbhttps://code.google.com/p/google-api-ads-ruby/source/browse/adwords_api/examples/v201209/misc/use_oauth2.rbto
  authenticate, the only difference is how we initialize the adwords api:

 adwords = AdwordsApi::Api.new({

 :library = {

   :log_level = DEBUG

 }}) 

 # option 1 and option 2 not modified from the example

 campaign_srv = adwords.service(:CampaignService, API_VERSION)


 We’ve downloaded the private key file and the path is set correctly and 
 we’ve tried both options. This is the error we get: 

 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/credential_handler.rb:65:in
  
 `set_credential': undefined method `[]=' for nil:NilClass (NoMethodError)

 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/api.rb:103:in
  
 `block in authorize'

 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/api.rb:102:in
  
 `each_pair'

 from 
 /path/.rvm/gems/ruby-1.9.3-p327/gems/google-ads-common-0.9.0/lib/ads_common/api.rb:102:in
  
 `authorize'


 Let me know if you need further information, i would like to find out the 
 possible reason for that error or if there is any error in our 
 configuration or code?

  

 Thank you in advance for your time,

 Georgi


-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 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