Here is the code on server side using the adwords client library:
          $redirectUri = 'postmessage';
  $OAuth2Handler = $user->GetOAuth2Handler();

  // Get the access token using the authorization code. Ensure you use the 
same
  // redirect URL used when requesting authorization.
  $user->SetOAuth2Info(
        $OAuth2Handler->GetAccessToken(
            $user->GetOAuth2Info(), $code, $redirectUri));

  $oauthInfo = $user->GetOAuth2Info();
  // The access token expires but the refresh token obtained for offline use
  // doesn't, and should be stored for later use.
  return $oauthInfo['refresh_token'];

On Tuesday, January 28, 2014 11:49:27 AM UTC-8, Pere Kyle wrote:
>
> Danial,
>
> It seems it may be related to the google api javascript library and 
> specifically using the postback option. I am requesting an auth_code via a 
> postback on the js side, then getting a refresh token using the php library 
> on server side. Should I degrade use of the postback option?
>
> Thanks,
> Pere
>
>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://googleadsdeveloper.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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to