Request is missing required authentication credential

688 views
Skip to first unread message

Can Manisalı

unread,
Oct 23, 2022, 6:32:53 AM10/23/22
to Google Ads API and AdWords API Forum
Hi,
I am sending my request like this:

var request_body={
    "query" : "SELECT   campaign.name,   campaign.status,   metrics.impressions,"+ "metrics.clicks,   metrics.ctr,   metrics.average_cpc,   metrics.cost_micros"+
 "FROM campaign  ORDER BY campaign.id"
}

"uri": "https://googleads.googleapis.com/v11/customers/ {customer-id}/googleAds:searchStream",
    "qs": { "Authorization": "Bearer access_token" ,"developer-token":"developer_token"},
    "method": "POST",
    "json": request_body

The response is as follows:
{
    error: {
      code: 401,
      message: 'Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.',
      status: 'UNAUTHENTICATED',
      details: [Array]
    }
  }


I couldn't find anything missing in my authentication credentials. Can you help?
Thank you.

Google Ads API Forum Advisor

unread,
Oct 24, 2022, 2:30:26 AM10/24/22
to canmani...@gmail.com, adwor...@googlegroups.com

Hi Can,


Thanks for reaching out to the Google Ads API team. I hope you are doing well today.


To further investigate the issue, could you please provide the complete request and response logs, with the request-id? If you haven't yet, logging can be enabled by navigating to the Client libraries > Your client library (ex. Java) > Logging documentation, which you can access from this link. I ask this so our team further investigates your concern and provides specific recommendations on the issue.


You can provide it via Reply privately to the author option. If this option is not available, then send it instead on this email address googleadsa...@google.com.
 

Regards,

Google Logo
Darwin
Google Ads API Team
 


ref:_00D1U1174p._5004Q2fnH8d:ref
Reply all
Reply to author
Forward
0 new messages