Hi, You can use "anonymous" as your consumer_key and consumer_secret for testing against sandbox or you can apply for getting both by following the instructions here http://code.google.com/apis/accounts/docs/RegistrationForWebAppsAuto.html
Best, -David Torres - AdWords API Team On Jun 16, 5:43 pm, Doug <doug.molin...@gmail.com> wrote: > Hi! So I finally got the examples to run! I am trying to get OAuth to work > with PHP and Google Adwords API, so far I wasn't able to even run this > UseOAuth.php script because I didn't have the oauth.so extension included in > my PHP installation. But now I've fixed that and I have gotten this far: > > php UseOAuth.php > Log in to your AdWords account and open the following > URL:https://www.google.com/accounts/OAuthAuthorizeToken?oauth_token=4%....ON > After approving the token enter the verification code here: -D....xn > Invalid auth/bad request (got a 400, expected HTTP/1.1 20X or a redirect) > > I have edited out my verification code and request token :) > > How come this isn't working? I have tried manually editing the script to > include my verification code, but it still didn't work. I have read the > README and it appears that I need to enter my credentials into auth.ini > > I found the auth.ini file and it says this: > > ;email = "INSERT_EMAIL_ADDRESS_HERE" > ;password = "INSERT_PASSWORD_HERE" > ;userAgent = "INSERT_COMPANY_NAME_HERE" > ;applicationToken = "INSERT_APPLICATION_TOKEN_HERE" > ;developerToken = "INSERT_DEVELOPER_TOKEN_HERE" > > ; Uncomment to make requests against a client account. > ; clientId = "INSERT_CLIENT_EMAIL_OR_CUSTOMER_ID_HERE" > > ; Uncomment the following to use an existing AuthToken. > ;authToken = "INSERT_AUTH_TOKEN" > > ; Uncomment the following to use existing OAuth information. > ; [OAUTH] > ; oauth_consumer_key = "INSERT_OAUTH_CONSUMER_KEY_HERE" > ; oauth_consumer_secret = "INSERT_OAUTH_CONSUMER_SECRET_HERE" > ; oauth_token = "INSERT_OAUTH_TOKEN_HERE" > ; oauth_token_secret = "INSERT_OAUTH_TOKEN_SECRET_HERE" > > So I have read that I do not need to supply an application token any more. > My developer token is "Pending Approval" via MCC, but I was told I could use > my email++USD to use the sandbox version of the API. So I tried putting that > under developerToken, but the php script resulted in the same Invalid/bad > ... error. > > I have edited my settings.ini to use the sandbox api uri: > > DEFAULT_SERVER = "https://adwords-sandbox.google.com" > > But still no luck! What am I doing wrong here? Do I need to acquire my OAuth > information? How do I get my consumer key and consumer secret? By the way I > have tried to use my email and password, but it didn't work either, > > Please help! Any advice would be a huge help, Thank you !!! :) -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://adwordsapi.blogspot.com http://groups.google.com/group/adwords-api =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords 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