Hey Takeshi, Can you please help me with this issue: -
I'm trying to run the same program as mentioned in this thread. Also, I have included all the dependencies. But, I'm still getting this error:- * Error Occurred java.lang.NoSuchMethodError: com.google.common.base.Joiner.on(C)Lcom/google/common/base/Joiner* on this line:- GoogleAuthorizationCodeFlow authorizationFlow = new GoogleAuthorizationCodeFlow.Builder( new NetHttpTransport(), new JacksonFactory(), CLIENT_ID, CLIENT_SECRET, Lists.newArrayList(SCOPE)) .setApprovalPrompt("force") // Set the access type to offline so that the token can be refreshed. .setAccessType("offline").build(); Can you help me with this error. Thanks, Kapil On Monday, December 17, 2012 4:12:16 PM UTC+5:30, Kapil wrote: > > Hey Takeshi, thanks a lot! > > > On Monday, December 17, 2012 11:38:27 AM UTC+5:30, Takeshi Hagikura > (AdWords API Team) wrote: >> >> Hi, >> >> You should insert the Client ID and the Client secret obtained from the >> url into the variable CLIENT_ID, CLIENT_SECRET. >> https://code.google.com/apis/console#access. >> >> 59 private static final String CLIENT_ID = "INSERT_CLIENT_ID_HERE"; >> 60 private static final String CLIENT_SECRET = >> "INSERT_CLIENT_SECRET_HERE"; >> You don't have to modify this part of code. >> 159 if (CLIENT_ID.equals("INSERT_CLIENT_ID_HERE") >> 160 || CLIENT_SECRET.equals("INSERT_CLIENT_SECRET_HERE")) { >> 161 throw new IllegalArgumentException("Please input your client >> IDs or secret. " >> 162 + "See https://code.google.com/apis/console#access"); >> 163 } >> Best, >> - Takeshi >> >> On Monday, December 17, 2012 3:00:50 PM UTC+9, Kapil wrote: >>> >>> Hey Takeshi, >>> >>> Thanks a lot. Could you please tell me about the second question I >>> asked. \ >>> >>> >>> https://code.google.com/p/google-api-ads-java/source/browse/examples/adwords_axis/src/main/java/adwords/axis/v201209/misc/OAuth2Example.java >>> >>> if you will look at the main function in this program there is a part >>> of code:- >>> >>> if (CLIENT_ID.equals("INSERT_CLIENT_ID_HERE") >>> || CLIENT_SECRET.equals("INSERT_CLIENT_SECRET_HERE")) { >>> throw new IllegalArgumentException("Please input your client IDs >>> or secret"+ "See https://code.google.com/apis/console#access");} >>> >>> What do I have to insert in "INSERT_CLIENT_ID_HERE" and >>> "INSERT_CLIENT_SECRET_HERE" >>> >>> >>> On Monday, December 17, 2012 10:46:32 AM UTC+5:30, Takeshi Hagikura >>> (AdWords API Team) wrote: >>>> >>>> Hello Kapil, >>>> >>>> In that example, you don't have to modify SCOPE, and the CALLBACK_URL. >>>> >>>> You should simply create Client ID for an installed application from >>>> the URL you supplied <https://code.google.com/apis/console#access>. >>>> Then copy the Client ID and Client secret to the sample >>>> code<https://code.google.com/p/google-api-ads-java/source/browse/examples/adwords_axis/src/main/java/adwords/axis/v201209/misc/OAuth2Example.java>(variables >>>> called CLIENT_ID and CLIENT_SECRET). >>>> >>>> Running that example, the program asks you to paste an url to the >>>> browser. >>>> like this ( >>>> https://accounts.google.com/o/oauth2/auth?access_type=offline& ... ) >>>> >>>> After that, paste the authorization code to the console, then you >>>> should get the results. >>>> >>>> Please also refer this document >>>> https://developers.google.com/adwords/api/docs/authentication#oauth >>>> >>>> Best, >>>> - Takeshi, AdWords API Team >>>> >>>> On Friday, December 14, 2012 7:37:39 PM UTC+9, Kapil wrote: >>>>> >>>>> I am new to adwords api and I want to run this program- >>>>> >>>>> >>>>> https://code.google.com/p/google-api-ads-java/source/browse/examples/adwords_axis/src/main/java/adwords/axis/v201209/misc/OAuth2Example.java >>>>> >>>>> I generated some parameters from this link- >>>>> https://code.google.com/apis/console#access >>>>> >>>>> But I don't know what are these parameters and how can I get these >>>>> parameters mention in the program:- >>>>> >>>>> SCOPE >>>>> CALLBACK_URL >>>>> CLIENT_ID >>>>> CLIENT_SECRET >>>>> >>>>> Also, if you will look at the main function in this program there is a >>>>> part of code:- >>>>> >>>>> if (CLIENT_ID.equals("INSERT_CLIENT_ID_HERE") >>>>> || CLIENT_SECRET.equals("INSERT_CLIENT_SECRET_HERE")) { >>>>> throw new IllegalArgumentException("Please input your client >>>>> IDs or secret"+ "See https://code.google.com/apis/console#access");} >>>>> >>>>> What do I have to insert in "INSERT_CLIENT_ID_HERE" and >>>>> "INSERT_CLIENT_SECRET_HERE" >>>>> >>>>> Please help me finding the solution. >>>>> >>>>> Kabir >>>>> >>>>> -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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