don't want to use MCC refresh_token?

36 views
Skip to first unread message

Hoang Van

unread,
Jun 8, 2018, 10:21:07 PM6/8/18
to AdWords API and Google Ads API Forum
sort question: client will do oauth2 for their adwords account on my website, so i will got refresh_token from their account. My oauth2 with client Id+ client secret using my google app. So how i use this credential in library: https://github.com/googleads/googleads-php-lib/
- i fill:
$config['ADWORDS']['developerToken'] = <-- my
$config['OAUTH2']['clientId'] <-- my app
$config['OAUTH2']['clientSecret'] <-- my app
$config['OAUTH2']['refreshToken'] <-- from user oauth2

but get error: 
Fatal error: Uncaught GuzzleHttp\Exception\ClientException: Client error: `POST https://www.googleapis.com/oauth2/v4/token` resulted in a `401 Unauthorized` response: { "error": "unauthorized_client", "error_description": "Unauthorized" } in vendor\guzzlehttp\guzzle\src\Exception\RequestException.php on line 113


thanks a lot.

Hoang Van

unread,
Jun 9, 2018, 6:16:06 AM6/9/18
to AdWords API and Google Ads API Forum
When i using 'access_type' => 'online'
said: set access_type=online?

Hoang Van

unread,
Jun 9, 2018, 6:23:13 AM6/9/18
to AdWords API and Google Ads API Forum
How can i provide access_token, with googleads-php-lib ? 

Luis Xander Talag (AdWords API Team)

unread,
Jun 11, 2018, 12:02:11 AM6/11/18
to AdWords API and Google Ads API Forum
Hi Hoang,

It seems your concern is more related to the PHP client library OAuth2 set up on behalf of you clients. I would suggest to post your issue here as the PHP client library owners are better equipped to assist you in this concern. Also, the access_token was automatically generated when using the PHP library, so there's no need to provide it.

Thanks and regards,
Luis
AdWords API Team
Reply all
Reply to author
Forward
0 new messages