'Request is missing required authentication credential. Expected OAuth 2 accesstoken, login cookie or other valid authentication credential(Googleads)

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.



Solution 1:[1]

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.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Delta George