problems getting refresh token

334 views
Skip to first unread message

Markus Tjoa

unread,
May 16, 2022, 10:23:52 AM5/16/22
to Google Ads API and AdWords API Forum
Hello,
I'm a bit at a loss here. I'm trying to set up a website, where I can display some metrics of my google ads campaigns.
I downloaded the Google Ads API Client Library for PHP at https://github.com/googleads/google-ads-php and followed the instructions there:
Got all the dependencies, installed the client library via Composer, got myself a developer token and so on...
After creating credentials in api center, I ran the  GenerateUserCredentials.php file in a console, but this gave me an error 400 redirect_uri_mismatch with a hint to " redirect_uri: http://127.0.0.1:43691" - so I added port 43691 to my redirect uri and tried again.
So far, so good,
Screenshot 2022-05-16 161349.png
but a click on next brings me to a connection failed page stating that no connection to 127.0.0.1:43691 could be established. I tried with different browsers and on different pcs, but with no luck...
Can anyone tell me, what's going wrong here?
kind regards,
Markus

Google Ads API Forum Advisor

unread,
May 16, 2022, 1:38:02 PM5/16/22
to mahag-mar...@kommid-muc.de, adwor...@googlegroups.com
Hi,

Thank you for reaching out to the Google Ads API support team.

Since you mentioned that you’re using OAuth Playground to generate my refresh token, could you confirm if you’ve followed this guide to add a line with: https://developers.google.com/oauthplayground under Authorized redirect URIs while setting up OAuth 2.0 web client app?If not added said above URL, then you may refer to the above provided guide for Playground, and let us know if issue persists.

Thanks,
Google Logo
Nirmita
Google Ads API Team
 


ref:_00D1U1174p._5004Q2atDbv:ref

Markus Tjoa

unread,
May 19, 2022, 9:08:30 AM5/19/22
to Google Ads API and AdWords API Forum
Hello Nirmita,
I didn't use Oauthplayground, I followed the insturctions on https://developers.google.com/google-ads/api/docs/oauth/cloud-project. I din't realize, there was a different way of doing this by using https://developers.google.com/oauthplayground.
Anyway: I tried it using OAuthplayground, and it worked :)
Thanks for your help
Kind Regards
Markus

Google Ads API Forum Advisor

unread,
May 20, 2022, 5:03:04 AM5/20/22
to mahag-mar...@kommid-muc.de, adwor...@googlegroups.com

Hi Markus,
 

Thank you for the update.
 

Our team is happy to hear that. If you have further questions / concerns for our team, please feel free to get back to us. We will be happy to address it
 

Regards,

Google Logo
Darwin
Google Ads API Team
 


ref:_00D1U1174p._5004Q2atDbv:ref
Reply all
Reply to author
Forward
0 new messages