Hello Carlos,

There is no need to go as deep as this. You are right about the point (4).

I have a bug logged to document it but here is the recap:

1. To create an instance with existing AuthToken pass the token as 
:auth_token element of :authentication hash:
  config = {
    :authentication => {:auth_token => 'token data'},
    [...other parameters]
  }
  adwords = AdwordsApi::Api.new(config)

  You can also set it at any time:
  adwords.authorize({:auth_token => 'token data'})

2. The same authorize method returns the token for storing:
  auth_token = adwords.authorize()

  you can optionally provide different set of credentials:
  auth_token = adwords.authorize({:email => 'email', :password => 
'password'})


-Danial, AdWords API Team.


On Wednesday, April 11, 2012 2:40:39 PM UTC+4, luis carlos mateos wrote:
>
> Hey, 
>
> More questions about getting the authentication token...
>
>    1. which parameters are needed to create the ClientLoginHandler object? 
>    I guess that I should pass the *config* of the AdwordsApi::Api object 
>    (so I first create the a = AdwordsApi::Api object and then I get its 
>    a.config) . But then, what is the server? "www.google.com"? "GOOGLE"? "
>    https://www.google.com";(this is the one it makes more sense for me)? 
>    It is rather confusing...
>    2. After that, once created that object, I've seen that the function 
> *auth_string(credentials, 
>    request) *is the one that will retrieve the token. But now my question 
>    is once again, first of all: what is request? 
>    3. In case that credentials is a email,password hash, why am I getting 
>    a 403 error which refuses my connection? 
>    4. I've seen that there is a function "*authorize*", 
>    in AdwordsApi::Api class that returns a sort of token, is it the one we 
> can 
>    use?
>    
> Thanks in advance
> Carlos
>  
>

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

Reply via email to