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> { 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 [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/f0ac8ce9-4751-423b-87be-82d6820cb101n%40googlegroups.com.