I'm trying to use keywords ideas with Google Ads API Rest Interface that the support provided me the curl example, I generate the access token and tested and it works!(by the way my main gole is to use curl php in the back end but i'm just testing with curl command for now) when I use this curl command to generate keywords ideas:

curl -i --request POST https://googleads.googleapis.com/v9/customers/8519781266:generateKeywordIdeas \ --header "Content-Type: application/json" \ --header "login-customer-id: 2260416591" \ --header "developer-token: EPJhOWi8NVNfcvFIoxY5LA" \ --header "Authorization: Bearer ya29.A0ARrdaM9BxaCZnArsoqMUdTMLLqimKRHTw1inCD2pjheLeRnVzV96Kxpag0pktYg8E0gHhjkD1SgKd3lExbCJQ5_KgLWibmW5ykfwCXiQp8ZB90CdtPvabPlKweToM6dYj8KnSn5mu2Z0uxkRIl2bpnFHtDUw2g" \ --data '{ "keywordSeed": { "keywords": [ "coffee" ] } }' 

It prints this error

{   "error": {     "code": 400,     "message": "Invalid JSON payload received. Closing quote expected in string.\n\n^",     "status": "INVALID_ARGUMENT"   } } 

I tried something else like getting the list of the accounts and it works

C:\Users\MostafaEzzat>curl -f --request GET "https://googleads.googleapis.com/v9/customers:listAccessibleCustomers" \ --header "Content-Type: application/json" \ --header "developer-token: EPJhOWi8NVNfcvFIoxY5LA" \ --header "Authorization: Bearer ya29.A0ARrdaM98bLbmUOuR431zfEPVpDoab8_sD0Mq8W4fhrHtrmgfX8nSaPyzcW1ooaIKRSQColaOCtsp-cYhgSxa9KPQ_RI4Ctv0o5L9jTA-VhDKweVHozpEWChqFpp4yihhQe3bfr1Fksxd5NCiWvUh1GWIaruNPA" \ {   "resourceNames": [     "customers/8519781266",     "customers/2260416591",     "customers/3084026203",     "customers/2897861276",     "customers/6210187694",     "customers/3242362947"   ] } 

Tag:google-ads-api, rest, curl

Add a new comment.