I've followed the directions best I could and when I run the following test 
command I get this error:

    Fault message: [AuthenticationError.NOT_ADS_USER @ ; trigger:'<null>']

Here is how I'm authenticating (JSON key parsed via `OpenSSL::PKey::RSA`):

    json = JSON.parse(Rails.application.secrets.adwords[:oauth2_key])
    key = OpenSSL::PKey::RSA.new(json['private_key'])

    @client = AdwordsApi::Api.new({
      authentication: {
        method:             'OAUTH2_SERVICE_ACCOUNT',
        user_agent:         'AdManager/1.0.0',
        oauth2_key:         key,
        oauth2_issuer:      
Rails.application.secrets.adwords[:oauth2_issuer],
        developer_token:    
Rails.application.secrets.adwords[:developer_token],
        client_customer_id: customer_id
      },
      service: {
        environment: 'PRODUCTION'
      },
      connection: {
        enable_gzip: false
      },
      library: {
        log_level: 'INFO'
      }
    })
    
    @client.service(:CampaignService, :v201708).get({:fields => ['Id', 
'Name', 'Status']}

Here are the steps I did in order:

1. Log into my MCC AdWords account
2. Visit Google Developer Console
3. Create a new Project
4. Create a Service Account key. Make sure the domain checkbox is checked. 
I use the email address it generates above in `oauth2_issuer`
5. Download the JSON key
6. Get an MCC account (I actually had one I use for live campaigns, so I 
skipped this step)
7. Generate an AdWords API key from within MCC (i used it above in 
`developer_token`).
8. Create a new test manager account.
9. Inside the new test manager account, create a new test client account, 
and take that customer ID and place it above in `client_customer_id.

I'm not sure where I went wrong, from what I can tell I followed the steps 
exactly.

Thanks

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

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.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/bc627756-fc81-4d23-a0d3-27adcd965c0c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to