Hi,

I'm migrating v201302 to v201306. But there are so many troubles around 
with me.

The first one is that I can't use "setAccessType" when I want to new a 
Credential.

In your document which used

GoogleCredential credential = new GoogleCredential.Builder().setTransport(
new NetHttpTransport())
.setJsonFactory( new JacksonFactory() )
.setServiceAccountId(accountId)
.setServiceAccountScopes( accountScopes )
.setServiceAccountPrivateKeyFromP12File(p12File)
.setServiceAccountUser(accountUser)
  .setAccessType("offline")
.build();

to create one, but I just can't do so.

It says the method(setAccessType) undefined.

But everything goes fine even if I don't use setAccessType, except using 
AdHoc(In the document, Reports Basic).

When the AdHoc asked me to use the Auth Token, I finally found out that I 
don't have one.

And I don't have the refresh token too(It returns null).

The only token I have is the access token but I don't think it's the 
correct one.

Because it returns "AuthenticationError.GOOGLE_ACCOUNT_COOKIE_INVALID" 
which can't find any solutions in the documents.

Then I try to use GoogleAuthorizationCodeFlow and OfflineCredentials which 
brings me more problems.

First, it told me to add two properties in the ads.properties which 
are clientId and clientSecret.

But the document told me to create an service account in the API console 
which have no clientSecret.

The account only have three columns, client id, email address and public 
key fingerprints(and a p12 file to download).

So I try to use the public key as the clientsecret and use the way you used 
in the example, "GetRefreshToken".

It generate a url and told me to paste in my browser. But it returns 
"redirect uri not matched".

Wait... a redirect uri? If I have to use the redirect uri then I should 
create a web application account but not a service account.....

I just want to know how to get the Auth Token when I'm using OAuth2.

Please telling me if I confused anything.

Best regards,

Brandon

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

--- 
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 adwords-api+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to