Hi Will,
To debug authentication access issues you while bypassing client library issues you may try generating a refresh tokek ny following our
OAuth Playground guide. and add a scope of '
https://www.googleapis.com/auth/userinfo.email' besides the Ads API scope of '
https://www.googleapis.com/auth/adwords' and then you can test who made the refresh token and what scopes this token has by generating an access token using this Bash terminal ready curl recipe for
Generating new access tokens, then using the following recipe in a browser:
https://oauth2.googleapis.com/tokeninfo?access_token=<INSERT_ACCESS_TOKEN>;.
If that works, then let's try a request from the command line:
- curl -i --header "Authorization: Bearer <INSERT_ACCESS_TOKEN>" --header "developer-token: <INSERT_DEV_TOKEN>" --header "login-customer-id: {LGNCID}" --data "{ 'query': 'SELECT campaign.id FROM campaign LIMIT 1' }" -X POST -H "Content-Type: application/json" https://googleads.googleapis.com/v11/customers/{CID}/googleAds:searchStream
If the above doesn't work, could you send us the results of all the above?
If it does work, you may use the refresh token generated above with your PHP installation. If it doesn't work there, could you send us a 'DEBUG' log level request and response log of raw API communications ?
The request and response appears similar to the
JSON Mappings in our REST documentation with additional headers and information such as
request Id. Here are logging instructions for our
PHP Ads API Client Library.
You may send the requested information via "Reply to author" or via
googleadsa...@google.com with a link to this forum post added to the new thread.