Re: PHP pass credentials dynamically (not through adsapi_php.ini)

2018-11-07 Thread 'Teja Makani' via AdWords API and Google Ads API Forum
Hello Robert, The solution described by Jean seems to be the best option for you based on your requirement. Regards, Sai Teja, AdWords API Team. On Friday, August 25, 2017 at 2:42:38 PM UTC-4, Tim Johnson wrote: > > Hi Support, > > As my application will be supporting users from multiple MCC

Re: PHP pass credentials dynamically (not through adsapi_php.ini)

2018-11-07 Thread robert
Hello Im about to start using the php-library after 10 years of Adwords Api the native style. But I am not able to find out how to share my credentials (including access token). When I read this thread I get the feeling that it is not a common use case, but when I read Google Ads-docs its

Re: PHP pass credentials dynamically (not through adsapi_php.ini)

2018-07-09 Thread Suraj Nayak
Thanks Shwetha , its been a great help. On Monday, August 28, 2017 at 10:01:27 PM UTC+5:30, Shwetha Vastrad (AdWords API Team) wrote: > > Hi Tim, > > You need to use OAuth2TokenBuilder >

Re: PHP pass credentials dynamically (not through adsapi_php.ini)

2018-02-05 Thread 'Thanet Knack Praneenararat (AdWords API Team)' via AdWords API Forum
Hello Jean, >From your narrated use case, I agree that what you've done is probably the best right now. Thanks for your time describing your use case so it can benefit other people too. Best, Thanet, AdWords API Team On Saturday, February 3, 2018 at 5:48:06 AM UTC+9, Jean-Fabrice Rabaute

Re: PHP pass credentials dynamically (not through adsapi_php.ini)

2018-02-02 Thread Jean-Fabrice Rabaute
>From what I understand this wouldn't work. I see the following problem with getOrFetchAccessToken in a distributed environment: Let's say I have two servers with the php code answering requests from clients, server A and server B. Those two servers can receive a request at the same time. As

Re: PHP pass credentials dynamically (not through adsapi_php.ini)

2018-02-02 Thread 'Thanet Knack Praneenararat (AdWords API Team)' via AdWords API Forum
Hello, Looking into this again, isn't the getOrFetchAccessToken method in OAuth2TokenRefresher similar to what you need? It can fetch a new

Re: PHP pass credentials dynamically (not through adsapi_php.ini)

2018-02-01 Thread Jean-Fabrice Rabaute
Hi, Sorry for the delay. I solved my problem by implementing "FetchAuthTokenInterface" interface and passing my implementation to "AdWordsSessionBuilder::withOAuth2Credential". The token refresh is now handled by my object and I can synchronize and use my custom caching as well the way I want.

Re: PHP pass credentials dynamically (not through adsapi_php.ini)

2018-01-09 Thread 'Thanet Knack Praneenararat (AdWords API Team)' via AdWords API Forum
Hello Jean, Nice to meet you. I'm an owner of the googleads-php-lib. I'm still following up all your conversation with my colleagues but from what you said in this thread, The google/google-auth-library-php (which is used by the adwords library) > seem to have the same problem (The app is

Re: PHP pass credentials dynamically (not through adsapi_php.ini)

2018-01-08 Thread 'Josh Radcliff (AdWords API Team)' via AdWords API Forum
Hi Jean, I'm going to send this over to our PHP client library expert. Since your questions revolve around the details of that library, you may want to open an issue on Github so we can track this under the library's issue tracker.

Re: PHP pass credentials dynamically (not through adsapi_php.ini)

2018-01-07 Thread Jean-Fabrice Rabaute
Hi Vincent, Thank you for your answer. I have added more questions inline. For info, I'm using the public google adwords php library . Le dimanche 7 janvier 2018 21:00:59 UTC-8, Vincent Racaza (AdWords API Team) a écrit : > > Hi Jean, > > If you

Re: PHP pass credentials dynamically (not through adsapi_php.ini)

2018-01-07 Thread 'Vincent Racaza (AdWords API Team)' via AdWords API Forum
Hi Jean, If you are using our client libraries, you don't need to manually set the access token in your request as the library itself is generating an access token in the background using your refresh token. If your access token is about to expire or has already expired, the client library

Re: PHP pass credentials dynamically (not through adsapi_php.ini)

2018-01-07 Thread Jean-Fabrice Rabaute
This github issue seems related to the problem I have: https://github.com/googleads/googleads-php-lib/issues/180 The answer seems to imply that an OAuth2 object should be instantiated and not use the OAuth2TokenBuilder (There is a way to set access_token with OAuth2 but not with

Re: PHP pass credentials dynamically (not through adsapi_php.ini)

2018-01-07 Thread Jean-Fabrice Rabaute
Hi, I'm working on migrating from the old api to the new one and I don't understand how to reuse the "access_token". When using OAuth2TokenBuilder and AdWordsSessionBuilder, I can set the "refresh_token" but not the "access_token". If I understand correctly, setting only the refresh_token will