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.

Tag:google-ads-api, google-api, google-oauth, asp.net-core

2 comments.

  1. Delta George

    You need to add a header to your Google Ads API Http request

    Authorization: Bearer <access_token>

    where access_tioken was returned by Google auth server.

    1. Pal Tech Academy

      I am sending like below format in c# . -> GoogleAdsConfig config = new GoogleAdsConfig() { DeveloperToken = AdwordsModel. DeveloperToke OAuth2Mode = OAuth2Flow.APPLICATION, OAuth2ClientId = AdwordsModel.OAuth2ClientId, OAuth2ClientSecret = AdwordsModel.OAuth2ClientSecret, OAuth2RefreshToken = AdwordsModel.OAuth2RefreshToken }; GoogleAdsClient = new GoogleAdsClient(config); but Not generating the Access token

Add a new comment.