Hi there, where do I access these logs please? Thank you, Werner
On Thu, Feb 10, 2022 at 4:44 PM [email protected] via Sales & Orders <[email protected]> wrote: > This message was sent to the following 2 people: Werner Reyneke, Google > Ads API Forum Advisor. Replying to this email will notify them. > Google Ads API Forum Advisor was added to the conversation by > [email protected] > > Hi Werner, > > Thanks for reaching out. Can you please privately provide us with the > complete request and response logs for this error? > > Thanks, > Matt > Google Ads API Team > > https://www.gstatic.com/images/branding/product/1x/googleg_64dp.png Matt > Google Ads API Team > https://google-dev-relations.my.salesforce.com/servlet/servlet.ImageServer?oid=00D1U000001174p&esid=0184Q00001FioQL&from=ext > > ref:_00D1U1174p._5004Q2W5q00:ref -- > -- > =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ > 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/N7gSG000000000000000000000000000000000000000000000R73FJP00tEbeEYw_TDa35KXZ7t_6MA%40sfdc.net > <https://groups.google.com/d/msgid/adwords-api/N7gSG000000000000000000000000000000000000000000000R73FJP00tEbeEYw_TDa35KXZ7t_6MA%40sfdc.net?utm_medium=email&utm_source=footer> > . > On Wed, Feb 9, 2022 at 02:21 PM, "Werner Reyneke" <[email protected]> > wrote: > > I get this error after having authenticated from within a .Net desktop > application: > > > Google.Ads.GoogleAds.V9.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." > > > What is the correct code to use to authenticate please? > > This is what I currently use: > > > GoogleAdsConfig config = new GoogleAdsConfig() > { > DeveloperToken = "******", > OAuth2Mode = OAuth2Flow.APPLICATION, > OAuth2ClientId = " > 77834483876-1kgp7ggidhacug709g3cb3.apps.googleusercontent.com", > OAuth2ClientSecret = "GOCSPX-PNxVv90i-niUB1YBJs1FUOCL", > OAuth2RefreshToken = "******" > }; > > //GoogleAdsConfig config = new GoogleAdsConfig(); > // Load the JSON secrets. > ClientSecrets secrets = new ClientSecrets() > { > ClientId = config.OAuth2ClientId, > ClientSecret = config.OAuth2ClientSecret > }; > > // Authorize the user using desktop application flow. > Task<UserCredential> task = GoogleWebAuthorizationBroker.AuthorizeAsync( > secrets, > new string[] { GOOGLE_ADS_API_SCOPE }, > String.Empty, > CancellationToken.None, > new NullDataStore() > ); > UserCredential credential = task.Result; > > // Store this token for future use. > string refreshToken = credential.Token.RefreshToken; > > // To make a call, set the refreshtoken to the config, and > // create the GoogleAdsClient. > config.OAuth2RefreshToken = refreshToken; > GoogleAdsClient client = new GoogleAdsClient(config); > > // Create the required service. > GoogleAdsServiceClient googleAdsService = client.GetService( > Services.V9.GoogleAdsService); > > > > -- > -- > =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ > 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/481bb481-9d3f-4512-b5de-ec035d4f6d2dn%40googlegroups.com > <https://groups.google.com/d/msgid/adwords-api/481bb481-9d3f-4512-b5de-ec035d4f6d2dn%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > [image: intercom] > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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/CAMrH_-m9%3DSo8QqjVPWS6j%2BjkG%2BCNmKKDwv-JLhNOCv%2BHSuNDrg%40mail.gmail.com.
