Access Token

2022-12-23 Thread Amitha Shenoy


How to get access token. Getting unauthorized error.


Which api should be called to get access token ? Any example ?
Really appreciate your help


Thanks and Regards
Amitha

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
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 adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/5fe33eff-a372-47ce-aefe-5f2882847597n%40googlegroups.com.


how to add authorization token in google rest api header

2022-12-23 Thread Amitha Shenoy
Hi,


below is my code, i am getting unauthorized error


 ClickConversion clickConversion = new ClickConversion()
{
ConversionAction = 
ResourceNames.ConversionAction(123-123-1122, 
Int64.Parse(conversionActionId)),
ConversionDateTime = conversionTime,
CurrencyCode = "USD"
};

var request = 
(HttpWebRequest)WebRequest.Create("https://googleads.googleapis.com/v12/customers/123-123-1122:uploadClickConversions;);
request.Method = "POST";
var data = new GoogleAdRequestBody("123-123-1122", 
new RepeatedField { clickConversion }, true, false);
using (var writer = new 
StreamWriter(request.GetRequestStream()))
{
writer.Write(data);
}
var webResponse = 
(HttpWebResponse)request.GetResponse();
result = webResponse.StatusCode;

I have added below setting to my json file

"GoogleAdsApi":
{
"DeveloperToken": "**",
"OAuth2Mode": "APPLICATION",
"OAuth2ClientId": "**.apps.googleusercontent.com",
"OAuth2ClientSecret": "**",
"OAuth2RefreshToken": "**",
}

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
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 adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/f0ac8ce9-4751-423b-87be-82d6820cb101n%40googlegroups.com.


Re: Error: Method not found: 'System.AppDomainSetup System.AppDomain.get_SetupInformation()'.

2022-12-17 Thread Amitha Shenoy
Yes, i am getting error while creating   var client = new
GoogleAdsClient(); instance . Thanks for assistance. I have posted my
question in the link provided.

On Sat, 17 Dec 2022 at 01:09, Google Ads API Forum Advisor
 wrote:

> Hi Amitha,
>
> Thank you for your reply and for the additional details you have provided.
>
> The "*Method not found: 'System.AppDomainSetup
> System.AppDomain.get_SetupInformation()'.*" error does not appear to be
> an API's service's error and seems to be related to the configuration of
> the client library
>  you
> are using.
>
> Based on your code and seeing that you appear to be using this C# example
> ,
> I would recommend that you reach out to their client library owners via
> this link , for
> additional guidance on this error. I hope this helps.
>
> Best regards,
>
> [image: Google Logo]
> Peter Laurence
> Google Ads API Team
>
>
> ref:_00D1U1174p._5004Q2h3jSU: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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
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 adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/CANysAYtjmr6joXF3v7Rj4k2RCYb1fgD4CtcZ5XUG6OoJ1ru5qg%40mail.gmail.com.


Re: Error: Method not found: 'System.AppDomainSetup System.AppDomain.get_SetupInformation()'.

2022-12-16 Thread Amitha Shenoy
Used below sample code from this link 
https://developers.google.com/google-ads/api/docs/conversions/upload-clicks 
, public void Run(GoogleAdsClient client, long customerId, long 
conversionActionId,
string gclid, string gbraid, string wbraid, string conversionTime,
double conversionValue)
{
// Get the ConversionActionService. *Here i am getting the error , 
which was mentioned in post*
ConversionUploadServiceClient conversionUploadService =
client.GetService(Services.V12.ConversionUploadService);

// Creates a click conversion by specifying currency as USD.
ClickConversion clickConversion = new ClickConversion()
{
ConversionAction = ResourceNames.ConversionAction(customerId, 
conversionActionId),
ConversionValue = conversionValue,
ConversionDateTime = conversionTime,
CurrencyCode = "USD"
};

// Verifies that exactly one of gclid, gbraid, and wbraid is specified, 
as required.
// See 
https://developers.google.com/google-ads/api/docs/conversions/upload-clicks
// for details.
string[] ids = { gclid, gbraid, wbraid };
int idCount = ids.Where(id => !string.IsNullOrEmpty(id)).Count();

if (idCount != 1)
{
throw new ArgumentException($"Exactly 1 of gclid, gbraid, or wbraid 
is " +
$"required, but {idCount} ID values were provided");
}

// Sets the single specified ID field.
if (!string.IsNullOrEmpty(gclid))
{
clickConversion.Gclid = gclid;
}
else if (!string.IsNullOrEmpty(wbraid))
{
clickConversion.Wbraid = wbraid;
}
else if (!string.IsNullOrEmpty(gbraid))
{
clickConversion.Gbraid = gbraid;
}

try
{
// Issues a request to upload the click conversion.
UploadClickConversionsResponse response =
conversionUploadService.UploadClickConversions(
new UploadClickConversionsRequest()
{
CustomerId = customerId.ToString(),
Conversions = { clickConversion },
PartialFailure = true,
ValidateOnly = false
});

// Prints the result.
ClickConversionResult uploadedClickConversion = response.Results[0];
Console.WriteLine($"Uploaded conversion that occurred at " +
$"'{uploadedClickConversion.ConversionDateTime}' from Google " +
$"Click ID '{uploadedClickConversion.Gclid}' to " +
$"'{uploadedClickConversion.ConversionAction}'.");
}
catch (GoogleAdsException e)
{
Console.WriteLine("Failure:");
Console.WriteLine($"Message: {e.Message}");
Console.WriteLine($"Failure: {e.Failure}");
Console.WriteLine($"Request ID: {e.RequestId}");
throw;
}
}

On Friday, 16 December 2022 at 14:02:43 UTC+5:30 adsapi wrote:

> Hi Amitha,
>
> Thank you for reaching out to us.
>
> For our team to further investigate and validate if the request is done 
> correctly, could you please provide us with the complete API logs (request 
> 
>  and response 
> 
>  with request-id 
> )
>  
> generated on your end?
>
> Note that this can be requested or provided to the developer handling the 
> Google Ads API transactions when logging of the API requests has been 
> enabled. You may check here 
> 
>  
> and click your client library for the specific guideline to enable it.
>
> You may then send the requested logs via the Reply privately to author 
> option. If this option is not available, you may send the details directly 
> to our googleadsa...@google.com alias instead.
>
> Best regards,
> [image: Google Logo] 
> Heidi 
> Google Ads API Team 
>   
>
> ref:_00D1U1174p._5004Q2h3jSU: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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
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 adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 

Getting this warning on Google.Ads.GoogleAds nuget

2022-12-16 Thread Amitha Shenoy
Package 'Google.Ads.GoogleAds 14.2.0' was restored using 
'.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, 
.NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, 
.NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8' instead of the 
project target framework '.NETCoreApp,Version=v2.1'. This package may not 
be fully compatible with your project.


Which package version i should refer for .net core 2.1

Regards,
Amitha

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
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 adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/fb7d951e-bf77-4193-b65e-0645526c3df3n%40googlegroups.com.


Error: Method not found: 'System.AppDomainSetup System.AppDomain.get_SetupInformation()'.

2022-12-15 Thread Amitha Shenoy
HI 

I am getting this Error
 Method not found: 'System.AppDomainSetup 
System.AppDomain.get_SetupInformation()'. 

when trying to create   service client
ConversionUploadServiceClient 
conversionUploadService = new 
GoogleAdsClient().GetService(Services.V12.ConversionUploadService);


Really appreciate any help ..


Thanks and Regards,
Amitha

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
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 adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/23c443c0-8c8d-4d4b-b22d-508611cbbcdfn%40googlegroups.com.