Re: OAuth 2.0 and link between MCC and new Customers Accounts
Hello Guys, I need some assistance here as well as I am facing the same kind of issues. The situation is the client's account is not linked to our MCC account. We got the refresh token for the client's account through the OAuth process. Could you please let us know the step we can follow with some code sample how to get the ClientCustomerId for the client which is not linked to our MCC. From the earlier post I did not get the exact steps how to get the values from the API call. Thanks, Bikram. On Tuesday, March 26, 2013 6:48:51 AM UTC-7, Kevin Winter (AdWords API Team) wrote: > > Hi, > You will want to use the ManagedCustomerService to get a list of > accounts linked to your MCC. The InfoService has been deprecated (in the > past it could be used to translate a clientEmail into a clientCustomerId, > but the ManagedCustomerService is a better way to get a list of accounts). > > - Kevin Winter > AdWords API Team > > On Tuesday, March 19, 2013 8:32:09 AM UTC-4, Taher Dhilawala wrote: >> >> Hi Stamatina, >> >> How do I use InfoService to get list of accounts (details) linked to my >> mcc account. What I understood from documentation of InfoService is that it >> only gives API usage for all the customers linked to the MCC accounts. >> Please correct if I understood wrongly. >> >> On Wednesday, January 16, 2013 7:07:20 PM UTC+5:30, Stamatina Thomaidou >> wrote: >>> >>> Thank you all for your answers. Eventually, we understood and found the >>> solution. We used JSON to get automatically from the response of the >>> OAuth2.0 authorization process the email and next we used the InfoService >>> to get the AdWords data. :) >>> >> -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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 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.
Re: OAuth 2.0 and link between MCC and new Customers Accounts
Hi, You will want to use the ManagedCustomerService to get a list of accounts linked to your MCC. The InfoService has been deprecated (in the past it could be used to translate a clientEmail into a clientCustomerId, but the ManagedCustomerService is a better way to get a list of accounts). - Kevin Winter AdWords API Team On Tuesday, March 19, 2013 8:32:09 AM UTC-4, Taher Dhilawala wrote: > > Hi Stamatina, > > How do I use InfoService to get list of accounts (details) linked to my > mcc account. What I understood from documentation of InfoService is that it > only gives API usage for all the customers linked to the MCC accounts. > Please correct if I understood wrongly. > > On Wednesday, January 16, 2013 7:07:20 PM UTC+5:30, Stamatina Thomaidou > wrote: >> >> Thank you all for your answers. Eventually, we understood and found the >> solution. We used JSON to get automatically from the response of the >> OAuth2.0 authorization process the email and next we used the InfoService >> to get the AdWords data. :) >> > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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.
Re: OAuth 2.0 and link between MCC and new Customers Accounts
Hi Stamatina, How do I use InfoService to get list of accounts (details) linked to my mcc account. What I understood from documentation of InfoService is that it only gives API usage for all the customers linked to the MCC accounts. Please correct if I understood wrongly. On Wednesday, January 16, 2013 7:07:20 PM UTC+5:30, Stamatina Thomaidou wrote: > > Thank you all for your answers. Eventually, we understood and found the > solution. We used JSON to get automatically from the response of the > OAuth2.0 authorization process the email and next we used the InfoService > to get the AdWords data. :) > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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.
Re: OAuth 2.0 and link between MCC and new Customers Accounts
Thank you all for your answers. Eventually, we understood and found the solution. We used JSON to get automatically from the response of the OAuth2.0 authorization process the email and next we used the InfoService to get the AdWords data. :) -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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
Re: OAuth 2.0 and link between MCC and new Customers Accounts
On Tuesday, 15 January 2013 09:43:11 UTC, Stamatina Thomaidou wrote: > > Chris thank you a lot for your answer but I do not think that answers to > our speculation. Maybe I didn't explain correctly the issue. :( > > The problem is that the returning value of ClientCustomerId of the Client > that gave us access through the OAuth 2.0 is *null*. > Shouldn't the OAuth 2.0 authorization process provide us with the > ClientCustomerId of the client that wanted to give us access to his data? > Of course in a previous step we have already linked his account to our > central MCC. The OAuth 2.0 isn't supposed to provide us with the > ClientCustomerId or should we ask the client to fill a form field using > explicitly his ClientCustomerId? > I may have misread this, but oauth2 won't give you the client id, you need to obtain that separately. When you authenticate with oauth2 you get 2 tokens - an access token and a refresh one. You can effectively forget the former as it is regenerated using the latter. These tokens can be obtained when logging in as any account - so you can get them for the mcc account or you can get them individually for each client account. If you obtained the authenticated and got the tokens as the MCC user, you to access any of the client accounts, but to do so you will need to specify the client id when you create an adwords session. If you don't specify the client ID, it will connect to the MCC and you will be limited to querying account details only. Use AdWordsSession.Builder().withClientCustomerId(xxx). To do this, use the oauth example but set the client ID to your MCC client ID. If you obtained the tokens from a client for a specific client account you can only access that account and won't need to specify the client ID. I suspect if this is the case, the api doesn't return the client ID as it fixed?? John > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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
Re: OAuth 2.0 and link between MCC and new Customers Accounts
Chris thank you a lot for your answer but I do not think that answers to our speculation. Maybe I didn't explain correctly the issue. :( On Tuesday, January 15, 2013 5:18:40 AM UTC+1, chris h wrote: > > Hi Stamatina, > If the client account is linked to your MCC account, then you can use your > OAuth token to a) get a list of all accounts and b) query those accounts > via the API. The customer has already granted you access via linking so you > don't need to have them grant via OAuth. They could still additionally do > an OAuth grant (anybody correct me if that's not so). Either way you use > OAuth 2.0. I don't believe there is a non-deprecated alternative to OAuth > 2.0. > - Chris > > Regarding the construction -we are using Java- of an AdWords Session with the usage of OAuth 2.0. We are following the examples of the v201209: // Construct a AdWordsSession. _adwordsSession = new AdWordsSession.Builder() .withDeveloperToken(DEVELOPER_TOKEN_HERE) .withOAuth2Credential(PREVIOUS_RETRIEVED_CREDENTIAL) .build(); The problem is that the returning value of ClientCustomerId of the Client that gave us access through the OAuth 2.0 is *null*. Shouldn't the OAuth 2.0 authorization process provide us with the ClientCustomerId of the client that wanted to give us access to his data? Of course in a previous step we have already linked his account to our central MCC. The OAuth 2.0 isn't supposed to provide us with the ClientCustomerId or should we ask the client to fill a form field using explicitly his ClientCustomerId? Please, could someone from the AdWords API Team answer to our question? :) > > On Monday, January 14, 2013 12:18:58 PM UTC-5, Stamatina Thomaidou wrote: >> >> Returning to my initial question: >> >> Let's say I am an MCC Account. >> If one of my many different linked client customer accounts tries to log >> in to my application and give me access to his data through OAuth 2.0 how >> can I retrieve with the usage of the OAuth 2.0 *automatically* his >> ClientCustomerId? >> Maybe I have not understand correctly the usefulness of the OAuth 2.0 >> protocol. >> I thought that getting all these authorization tokens from the OAuth 2.0 >> I would at the same time be able to retrieve the ClientCustomerId. >> >> In general, what information does the OAuth 2.0 provide you and why is it >> better to use it? >> > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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
Re: OAuth 2.0 and link between MCC and new Customers Accounts
Hi Stamatina, If the client account is linked to your MCC account, then you can use your OAuth token to a) get a list of all accounts and b) query those accounts via the API. The customer has already granted you access via linking so you don't need to have them grant via OAuth. They could still additionally do an OAuth grant (anybody correct me if that's not so). Either way you use OAuth 2.0. I don't believe there is a non-deprecated alternative to OAuth 2.0. - Chris On Monday, January 14, 2013 12:18:58 PM UTC-5, Stamatina Thomaidou wrote: > > Returning to my initial question: > > Let's say I am an MCC Account. > If one of my many different linked client customer accounts tries to log > in to my application and give me access to his data through OAuth 2.0 how > can I retrieve with the usage of the OAuth 2.0 *automatically* his > ClientCustomerId? > Maybe I have not understand correctly the usefulness of the OAuth 2.0 > protocol. > I thought that getting all these authorization tokens from the OAuth 2.0 I > would at the same time be able to retrieve the ClientCustomerId. > > In general, what information does the OAuth 2.0 provide you and why is it > better to use it? > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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
Re: OAuth 2.0 and link between MCC and new Customers Accounts
Returning to my initial question: Let's say I am an MCC Account. If one of my many different linked client customer accounts tries to log in to my application and give me access to his data through OAuth 2.0 how can I retrieve with the usage of the OAuth 2.0 *automatically* his ClientCustomerId? Maybe I have not understand correctly the usefulness of the OAuth 2.0 protocol. I thought that getting all these authorization tokens from the OAuth 2.0 I would at the same time be able to retrieve the ClientCustomerId. In general, what information does the OAuth 2.0 provide you and why is it better to use it? -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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
Re: OAuth 2.0 and link between MCC and new Customers Accounts
Thank you both for your replies :) We will try some of the tips and we will get back with updates if we continue to have problems. -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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
Re: OAuth 2.0 and link between MCC and new Customers Accounts
Sorry, cut and pasted but missed off you'll need to add .withEnvironment(AdWordsSession.Environment.PRODUCTION) to the session builder line John On Sunday, 13 January 2013 08:30:33 UTC, John Lister wrote: > > Hi, if you are using oauth2, you can get rid of the ads.properties file > altogether. Use the oauth2 example to generate your refresh token - After > the line with authorizationFlow.createAndStoreCredential, simply save the > value of credential.getRefreshToken(). When you run this make sure you put > your mcc account client/customer id into the ads.properties file. > Alternatively you can get a refresh token for each adwords account and save > that, but the using a mcc one saves switching each time. > > Once you have a refresh token, you can use the following in your client > code: > > GoogleCredential credential = new > GoogleCredential.Builder().setTransport(HTTP_TRANSPORT) > .setJsonFactory(JSON_FACTORY) > .setClientSecrets(CLIENT_ID, CLIENT_SECRET) > .build(); > // TODO - get this from the db for each account if we don't manage > them all under the same mcc > > credential.setRefreshToken(getRefreshTokenForCustomer(ADWORDS_CLIENT_ID); > AdWordsSession session = new > AdWordsSession.Builder().withDeveloperToken(ADWORDS_DEV_TOKEN).withUserAgent("UserAgent").withClientCustomerId(ADWORDS_CLIENT_ID).withOAuth2Credential(credential).build(); > > > where the CLIENT_ID and CLIENT_SECRET are from the api console and the > ADWORDS_CLIENT_ID is the 9ish digit adwords account number and > ADWORDS_DEV_TOKEN is you developer token for the mcc account. > > You can pass any other options in a similar fashion... > > Hope that helps > > John > > On Saturday, 12 January 2013 11:41:44 UTC, Kapil wrote: >> >> Hey Stamatina, >> >> I'm not sure which language you are using, but here is what I'm doing in >> java. >> >> In ads.properties you can see a section:- >> >> *1.* api.adwords.clientCustomerId=INSERT_CLIENT_CUSTOMER_ID_HERE >> >> You can define one of the client_ids that are connected to your MCC >> account. >> Now, next time if you want to change the client Id to other ids that are >> present in MCC account, you can simply do it by creating adwords session >> and set the id in that session...like this:- >> >> String clientLoginToken = new >> ClientLoginTokens.Builder().forApi(ClientLoginTokens.Api.ADWORDS).fromFile().build().requestToken(); >> AdWordsSession session = new >> AdWordsSession.Builder().fromFile().withClientLoginToken(clientLoginToken).build(); >> >> session.setClientCustomerId(clientCustomerId) >> >>AdWordsServices adWordsServices = new AdWordsServices(); >> >> *2.* You can also use OAuth 2.0 for that. You don't have to refresh it >> all the time. >> >> In ads.properties set the refresh oauth token true >> >> api.adwords.refreshOAuth2Token=true >> >> *3.* I'm not sure on this one but I think you have to link the new client Id >> with your MCC account. >> >> >> *4.* If you want to refresh the authentications manually then I guess after >> every 60 minutes you have to refresh the credentials. >> >> >> 5. I'm also facing this issue regarding storing the credential in the >> database so that I can access it and refresh the same credential again and >> again. >> >> >> I hope this helps. >> >> >> Thanks, >> >> >> Kapil >> >> >> On Friday, January 11, 2013 8:39:08 PM UTC+5:30, Stamatina Thomaidou >> wrote: >>> >>> Hello everyone, >>> >>> this is a more general question regarding the new ways that we have to >>> work with authentication and access to the accounts. >>> >>> We have a developer token for the AdWords API that actually corresponds >>> to an MCC Account. We have already some client/customer accounts that are >>> already linked through the AdWords Interface and Tab "Link Existing >>> Accounts" and let's say that we want to modify their campaigns etc. Do we >>> have to use an ads.properties file for each one of them? Is there any other >>> way? Or do we have to access them programmatically using OAuth 2.0 with >>> temporary access tokens that each time we have to refresh them? >>> Now imagine that we want to have access to totally new clients/customers >>> that are not yet linked to the MCC Account. Can we have access to them only >>> through OAuth 2.0 and how? Or is it mandatory to go to the AdWords >>> interface and Tab "Link Existing Accounts" and define explicitly there that >>> we want to administrate and have access to them through the API? >>> >>> Is there any documentation/tutorial inside this webpage that I may have >>> not seen? I think that is a good idea to explain further all these concepts >>> with some example scenarios. >>> >>> Next, a more focused question. The credential received from the OAuth >>> 2.0 authentication is a temporary one. Thus, how much often do we have to >>> refresh it? How can we store the credential info inside let's say a >>> database f
Re: OAuth 2.0 and link between MCC and new Customers Accounts
Hi, if you are using oauth2, you can get rid of the ads.properties file altogether. Use the oauth2 example to generate your refresh token - After the line with authorizationFlow.createAndStoreCredential, simply save the value of credential.getRefreshToken(). When you run this make sure you put your mcc account client/customer id into the ads.properties file. Alternatively you can get a refresh token for each adwords account and save that, but the using a mcc one saves switching each time. Once you have a refresh token, you can use the following in your client code: GoogleCredential credential = new GoogleCredential.Builder().setTransport(HTTP_TRANSPORT) .setJsonFactory(JSON_FACTORY) .setClientSecrets(CLIENT_ID, CLIENT_SECRET) .build(); // TODO - get this from the db for each account if we don't manage them all under the same mcc credential.setRefreshToken(getRefreshTokenForCustomer(ADWORDS_CLIENT_ID); AdWordsSession session = new AdWordsSession.Builder().withDeveloperToken(ADWORDS_DEV_TOKEN).withUserAgent("UserAgent").withClientCustomerId(ADWORDS_CLIENT_ID).withOAuth2Credential(credential).build(); where the CLIENT_ID and CLIENT_SECRET are from the api console and the ADWORDS_CLIENT_ID is the 9ish digit adwords account number and ADWORDS_DEV_TOKEN is you developer token for the mcc account. You can pass any other options in a similar fashion... Hope that helps John On Saturday, 12 January 2013 11:41:44 UTC, Kapil wrote: > > Hey Stamatina, > > I'm not sure which language you are using, but here is what I'm doing in > java. > > In ads.properties you can see a section:- > > *1.* api.adwords.clientCustomerId=INSERT_CLIENT_CUSTOMER_ID_HERE > > You can define one of the client_ids that are connected to your MCC > account. > Now, next time if you want to change the client Id to other ids that are > present in MCC account, you can simply do it by creating adwords session > and set the id in that session...like this:- > > String clientLoginToken = new > ClientLoginTokens.Builder().forApi(ClientLoginTokens.Api.ADWORDS).fromFile().build().requestToken(); > AdWordsSession session = new > AdWordsSession.Builder().fromFile().withClientLoginToken(clientLoginToken).build(); > > session.setClientCustomerId(clientCustomerId) > >AdWordsServices adWordsServices = new AdWordsServices(); > > *2.* You can also use OAuth 2.0 for that. You don't have to refresh it > all the time. > > In ads.properties set the refresh oauth token true > > api.adwords.refreshOAuth2Token=true > > *3.* I'm not sure on this one but I think you have to link the new client Id > with your MCC account. > > > *4.* If you want to refresh the authentications manually then I guess after > every 60 minutes you have to refresh the credentials. > > > 5. I'm also facing this issue regarding storing the credential in the > database so that I can access it and refresh the same credential again and > again. > > > I hope this helps. > > > Thanks, > > > Kapil > > > On Friday, January 11, 2013 8:39:08 PM UTC+5:30, Stamatina Thomaidou wrote: >> >> Hello everyone, >> >> this is a more general question regarding the new ways that we have to >> work with authentication and access to the accounts. >> >> We have a developer token for the AdWords API that actually corresponds >> to an MCC Account. We have already some client/customer accounts that are >> already linked through the AdWords Interface and Tab "Link Existing >> Accounts" and let's say that we want to modify their campaigns etc. Do we >> have to use an ads.properties file for each one of them? Is there any other >> way? Or do we have to access them programmatically using OAuth 2.0 with >> temporary access tokens that each time we have to refresh them? >> Now imagine that we want to have access to totally new clients/customers >> that are not yet linked to the MCC Account. Can we have access to them only >> through OAuth 2.0 and how? Or is it mandatory to go to the AdWords >> interface and Tab "Link Existing Accounts" and define explicitly there that >> we want to administrate and have access to them through the API? >> >> Is there any documentation/tutorial inside this webpage that I may have >> not seen? I think that is a good idea to explain further all these concepts >> with some example scenarios. >> >> Next, a more focused question. The credential received from the OAuth 2.0 >> authentication is a temporary one. Thus, how much often do we have to >> refresh it? How can we store the credential info inside let's say a >> database field? (Due to the credential object does not correspond to an >> understandable form for let's say a mysql database field). >> > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and discussion group: http://adwordsapi.blogspot.com http://groups.google.com/group/adwords-api =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Re: OAuth 2.0 and link between MCC and new Customers Accounts
Hey Stamatina, I'm not sure which language you are using, but here is what I'm doing in java. In ads.properties you can see a section:- *1.* api.adwords.clientCustomerId=INSERT_CLIENT_CUSTOMER_ID_HERE You can define one of the client_ids that are connected to your MCC account. Now, next time if you want to change the client Id to other ids that are present in MCC account, you can simply do it by creating adwords session and set the id in that session...like this:- String clientLoginToken = new ClientLoginTokens.Builder().forApi(ClientLoginTokens.Api.ADWORDS).fromFile().build().requestToken(); AdWordsSession session = new AdWordsSession.Builder().fromFile().withClientLoginToken(clientLoginToken).build(); session.setClientCustomerId(clientCustomerId) AdWordsServices adWordsServices = new AdWordsServices(); *2.* You can also use OAuth 2.0 for that. You don't have to refresh it all the time. In ads.properties set the refresh oauth token true api.adwords.refreshOAuth2Token=true *3.* I'm not sure on this one but I think you have to link the new client Id with your MCC account. *4.* If you want to refresh the authentications manually then I guess after every 60 minutes you have to refresh the credentials. 5. I'm also facing this issue regarding storing the credential in the database so that I can access it and refresh the same credential again and again. I hope this helps. Thanks, Kapil On Friday, January 11, 2013 8:39:08 PM UTC+5:30, Stamatina Thomaidou wrote: > > Hello everyone, > > this is a more general question regarding the new ways that we have to > work with authentication and access to the accounts. > > We have a developer token for the AdWords API that actually corresponds to > an MCC Account. We have already some client/customer accounts that are > already linked through the AdWords Interface and Tab "Link Existing > Accounts" and let's say that we want to modify their campaigns etc. Do we > have to use an ads.properties file for each one of them? Is there any other > way? Or do we have to access them programmatically using OAuth 2.0 with > temporary access tokens that each time we have to refresh them? > Now imagine that we want to have access to totally new clients/customers > that are not yet linked to the MCC Account. Can we have access to them only > through OAuth 2.0 and how? Or is it mandatory to go to the AdWords > interface and Tab "Link Existing Accounts" and define explicitly there that > we want to administrate and have access to them through the API? > > Is there any documentation/tutorial inside this webpage that I may have > not seen? I think that is a good idea to explain further all these concepts > with some example scenarios. > > Next, a more focused question. The credential received from the OAuth 2.0 > authentication is a temporary one. Thus, how much often do we have to > refresh it? How can we store the credential info inside let's say a > database field? (Due to the credential object does not correspond to an > understandable form for let's say a mysql database field). > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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