var campaignData = new
{
campaign = new
{
name = "My Campaign",
advertisingChannelType = "SEARCH",
status = "PAUSED",
startDate = "2023-06-01",
endDate = "2023-06-30",
budget = new
{
name = "My Budget",
deliveryMethod = "STANDARD",
amountMicros = 50000000
}
}
};
using (var client = new HttpClient())
{
client.DefaultRequestHeaders.Authorization = new
AuthenticationHeaderValue("Bearer", accessToken);
var requestUrl =
$"https://googleads.googleapis.com/v11/customers/{customerId}/campaigns";
var content = new
StringContent(JsonConvert.SerializeObject(campaignData), Encoding.UTF8,
"application/json");
var response = await client.PostAsync(requestUrl, content);
if (response.IsSuccessStatusCode)
{
var responseContent = await
response.Content.ReadAsStringAsync();
Console.WriteLine("Campaign created successfully.");
Console.WriteLine(responseContent);
}
else
{
Console.WriteLine($"Failed to create campaign. Status
code: {response.StatusCode}");
}
i gor 404 error response, can you please provide me google ads related rest
api list with documentation?
thank
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/2384b617-c02c-4ca4-b9a5-f7f37f9a3184n%40googlegroups.com.