Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential.

5,356 views
Skip to first unread message

Sajal Pal

unread,
Apr 22, 2022, 1:39:35 AM4/22/22
to Google Ads API and AdWords API Forum
Hi,
I am trying to migrate Adwords API(sunset on 27th April, 2022) to Google Ads api. Using Asp.Net Core(5.0) and c#.

Exception:
Google.Ads.GoogleAds.V10.Errors.GoogleAdsException
  HResult=0x80131500
  Message=Status(StatusCode="Unauthenticated", Detail="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.",

I want to use "keywordPlanIdeaService"
Can anyone have any suggestions.

Google Ads API Forum Advisor

unread,
Apr 22, 2022, 2:43:37 PM4/22/22
to sa...@ntooitive.com, adwor...@googlegroups.com
Hi Sajal,

Thank you for reaching out to the Google Ads API support team.

To investigate the issue further, could you please provide us with the complete logs (request and response with request-id) via the Reply privately to the author option?

Thanks,
Google Logo
Nirmita
Google Ads API Team
 


ref:_00D1U1174p._5004Q2a5kk2:ref

Sajal Pal

unread,
Apr 25, 2022, 12:50:50 PM4/25/22
to Google Ads API and AdWords API Forum
Hi  Nirmita,
Currently,  we are sending request like below 
                            GoogleAdsConfig config = new GoogleAdsConfig() {
                             DeveloperToken = AdwordsModel.DeveloperToken,
                             OAuth2Mode = OAuth2Flow.APPLICATION,
                             OAuth2ClientId = AdwordsModel.OAuth2ClientId,
                             OAuth2ClientSecret = AdwordsModel.OAuth2ClientSecret,
                             OAuth2RefreshToken = AdwordsModel.OAuth2RefreshToken
                            };
                            GoogleAdsClient = new GoogleAdsClient(config);

For One Account We are able to generate Access token, But for Other App we are not able to generate the Access token..

Google Ads API Forum Advisor

unread,
Apr 26, 2022, 10:02:28 AM4/26/22
to sa...@ntooitive.com, adwor...@googlegroups.com
Hi Sajal, 

Thank you for the replies. I work with Nirmita and allow me to assist you here.

With regard to your concern "For One Account We are able to generate Access token, But for Other App we are not able to generate the Access token..", could you please elaborate on this concern and please provide more context of details so that we can address this. In addition to our clarification are you referring to specific authentication or Google Ads account? 

Best regards,
Google Logo
Jinky
Google Ads API Team
 


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