Skip to first unread message

Ethan Lyon

unread,
Dec 27, 2014, 8:26:47 PM12/27/14
to adwor...@googlegroups.com
Hi There,

I'm having an issue authenticating the Adwords API on my webserver. I've been at it for hours, troubleshooting with Google and youtube tutorials and thought I would ask for some help.

  1. I uploaded the files here: https://github.com/googleads/googleads-php-lib to a folder on my server (e.g. http//dev.example.com/folder/)
  2. Created an MCC account, thus receiving a dev token, pending (followed this tutorial on creating a test account)
  3. Created a test MCC account and registered a web application on https://console.developers.google.com/ (Apis & Auth -> Credentials -> Create New Client ID -> assigned Redirect URIs to e.g. http//dev.example.com/)
  4. Went to this folder: "/googleads-php-lib-5.7.1/src/Google/Api/Ads/AdWords/auth.ini" from this tutorial: https://www.youtube.com/watch?v=Idvia4600_E (NOTE: missing OAuth 2.0)
  5. Here is the code:
  6. ; Detailed descriptions of these properties can be found at:

    developerToken = "PRODUCTION MCC ACCOUNT API DEVELOPER TOKEN (PENDING)"
    userAgent = "MY NAME"

    ; Uncomment clientCustomerId to make requests against a single AdWords account,
    ; such as when you run the examples.
    ; If you don't set it here, you can set the client customer ID dynamically:
    ;  $user = new AdWordsUser();
    ;  $user->SetClientCustomerId(...);

    ; clientCustomerId = "CUSTOMER ID FROM MY TEST MCC ACCOUNT"

    [OAUTH2]

    ; If you do not have a client ID or secret, please create one of type
    ; "installed application" in the Google API console:
    client_id = "USED CLIENT ID FROM TEST MCC CONSOLE PROJECT"
    client_secret = "USED CLIENT SECRET FROM TEST MCC CONSOLE PROJECT"

    ; If you already have a refresh token, enter it below. Otherwise run
    ; GetRefreshToken.php.
    refresh_token = "USED WHATEVER CAME AFTER 'CODE=' IN THE DESTINATION URL, FOLLOWING THESE INSTRUCTIONS: https://developers.google.com/accounts/docs/OAuth2WebServer"
  7. I'm trying to get keyword search volume data so I ran this code: /googleads-php-lib-5.7.1/examples/AdWords/v201409/Optimization/EstimateKeywordTraffic.php and /googleads-php-lib-5.7.1/examples/AdWords/v201409/Optimization/GetKeywordIdeas.php but only found a blank page. 
Is it an Auth issue? Am I doing something wrong?

Any help would be much appreciated.

Thanks!

Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages