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 ac

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 strong

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 wrot

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 t

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 a

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 unabl

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. Thanks

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 a

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 will

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 OAuth2TokenBuil

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

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

2017-08-28 Thread 'Shwetha Vastrad (AdWords API Team)' via AdWords API Forum
Hi Tim, You need to use OAuth2TokenBuilder and AdWordsSessionBuilder

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

2017-08-25 Thread Tim Johnson
Hi Shwetha, Thanks for the link but I do not think this addresses my question as that guide doesn't address to how pass through the token if you already have it. Also, it appears this information still needs to be hard-coded into PHP files. I have built the token, I have the .json file (could

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

2017-08-25 Thread 'Shwetha Vastrad (AdWords API Team)' via AdWords API Forum
Hi Tim, If you would prefer not to use the adsapi_php.ini file to store the OAuth2 credentials, you can use the OAuth2TokenBuilder and AdWordsSessionBuilder

PHP pass credentials dynamically (not through adsapi_php.ini)

2017-08-25 Thread Tim Johnson
Hi Support, As my application will be supporting users from multiple MCC accounts, I would prefer to not have to hardcode authentication credentials in the adsapi_php.ini to authenticate requests (as suggested in the documentation). Instead, I would like to pass the token/other credentials as