Hi,
get error when try to get data from google ads:

Error: 7 PERMISSION_DENIED: Google Ads API has not been used in project 
xxxxxxxxxx before or it is disabled. Enable it by visiting 
https://console.developers.google.com/apis/api/googleads.googleapis.com/overview?project=xxxxxxxxxx
 then 
retry. If you enabled this API recently, wait a few minutes for the action 
to propagate to our systems and retry.

*code:*
const {GoogleAdsApi, enums} = require('google-ads-api');

const client = new GoogleAdsApi({
client_id: 'xxxxxxxxxxxx',
client_secret: 'xxxxxxxxxxxx',
developer_token: 'xxxxxxxxxxxx',
})

const customer = client.Customer({
customer_id: '000-000-0000',
refresh_token: 'xxxxxxxxxxxx',
});

const campaigns = await customer.report({
entity: "ad_group",
metrics: [
"metrics.cost_micros",
"metrics.clicks",
"metrics.impressions",
"metrics.all_conversions",
],
segments: ["segments.date"],
from_date: "2021-11-10",
to_date: "2021-11-11",
});

What is wrong ?
How to resolve this issue ?

thanks

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/59445aff-a41c-4b76-aa9e-4a5569b85956n%40googlegroups.com.
  • Er... Michael Fedorov
    • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
      • ... Michael Fedorov

Reply via email to