Greetings, everyone.

I have few nooby questions about the adwords sandbox API. Yes, I've
searched the google and tried to check the docs as well as tried to
run code examples provided along with PHP library.

My setup is the following:
1. PHP Library provided by google: 
http://code.google.com/p/google-api-adwords-php/
2. OAuth as authentication method
3. Sandbox environment

My questions are the following:
1. Am I right using OAuth with regular settings in order to acquire
token to access my adwords sandbox environment? Or is there some kind
of sandbox token retrieval, which differs from the live setup?
2. Is it _required_ (i.e. OAuth won't work otherwise) that I register
domain in Google and create self-signed certificate and sign every
request made with OAuth and token? Is this required for development/
sandbox? Is it required for Live setup?
3. Am I right doing the OAuth-enabled request with the code below:

$oauthInfo = array(
        'oauth_consumer_key' => $config->oauth_consumer_key,
        'oauth_consumer_secret' => $config->oauth_consumer_secret,
        'oauth_token' => $config->oauth_token,
        'oauth_token_secret' => $config->oauth_token_secret
);

// Create the AdWordsUser and set the OAuth info.
$user = new AdWordsUser();
$user->SetOAuthInfo($oauthInfo);
$user->LogAll();

// Do the rest of the job
$campaignService = $user->GetService('CampaignService', 'v201109',
$this->_server);
...

4. consumer_key and consumer_secret are acquired by registering domain
with Google service. Can I work without these? In sandbox? On live
setup? How?

The problem is when I try to connect to the sandbox ADwords API I keep
getting "token invalid" error even though there were no errors on all
the OAuth token retrieval steps (i.e. both request and upgrade went
ok). This error message, as far as I understand, can be caused by many
reasons like I can't use live OAuth token in sandbox environment, or I
do not sign my OAuth requests or my token was requested/upgraded
incorrectly etc. That's why I'm asking questions above hoping to find
the reason it does not work for me.

This is it, for now. I thank you very much in advance for the answers.

Best regards,
Alex.

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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

Reply via email to