Ok guys, i just found the solution to the request body for generating 
keyword ideas. I have made the necessary correction and my code is running 
alright along with the Rest API.
Thanks to all who had intention to help me with a solution.

On Friday, June 4, 2021 at 12:24:20 PM UTC Salomey Arthur wrote:

> Hello Peter,
>
> Thanks for reaching out. Please check out my code for generating the 
> keyword ideas:
>
> $curl = curl_init();
>     curl_setopt_array($curl, array(
>     CURLOPT_URL => "
> https://googleads.googleapis.com/v7/customers/{customer 
> id}:generateKeywordIdeas",
>
>     CURLOPT_RETURNTRANSFER => true,
>     CURLOPT_ENCODING => "",
>     CURLOPT_MAXREDIRS => 10,
>     CURLOPT_TIMEOUT => 30,
>     CURLOPT_FOLLOWLOCATION => false,
>     CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
>     CURLOPT_CUSTOMREQUEST => "POST",
>     CURLOPT_POSTFIELDS =>"{
>         'geoTargetConstants': ['USA','Canada'],
>         'includeAdultKeywords': 'false',
>         'pageToken': '1',
>         'pageSize': '1000',
>         'keywordPlanNetwork': 'GOOGLE_SEARCH',
>         'keywordAnnotation': ['KEYWORD_CONCEPT'],
>         'aggregateMetrics': 'DEVICE',
>         'language': 'English',
>         'siteSeed': {
>             'site': 'https://www.example.com'
>
>             } 
>     }",
>     CURLOPT_HTTPHEADER => array(
>         "Content-Type: application/json",
>         "developer-token: {developer token}",
>         "login-customer-id: {manager id}",
>         "Authorization: Bearer {bearer token}"
>
>         ),
>     ));
>     $response = curl_exec($curl);
>     
>     curl_close($curl);
>     var_dump($response);
>
> On Friday, June 4, 2021 at 5:50:39 AM UTC adsapiforumadvisor wrote:
>
>> Hi,
>>
>> I'm from the API support team and allow me to chime in on your concern.
>>
>> Examples <https://developers.google.com/google-ads/api/rest/examples> 
>> are currently limited and we do not have one specific to what you are 
>> looking for. That said, could you share the error you are encountering so 
>> our team can have a closer look?
>>
>>
>> Best regards,
>>
>> [image: Google Logo] 
>> Peter Laurence Napa Oliquino 
>> Google Ads API Team 
>>   
>>
>> ref:_00D1U1174p._5004Q27vHQp: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 
"AdWords API and Google Ads 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/fff0bf69-7c49-4132-b21d-371bfa67f468n%40googlegroups.com.

Reply via email to