google-ads-doctor
google-ads-doctor copied to clipboard
I'm getting a redirect_uri_mismatch error after application receives the token
I'm getting a weird error from the binary, which indicates that the redirect uri is invalid.
The redirect url is already listed on my 'Authorized redirect URIs.' of my app.
I don't quite understand why I would be able to get the refresh token, but then given what looks like an error regarding using the wrong redirect URL.
C:\test\google-ads-doctor\oauthdoctor\bin\windows\amd64>oauthdoctor.exe --verbose -language php -oauthtype web -sysinfo
2020/07/22 16:43:25 Client library language: php
Host: ADMINRG-0VC3H2Q
CPUs: 8
OS: windows
Arch: amd64
PageSize: 4096 bytes
Heap: 285176 bytes
IPV4:192.168.56.1
IPV4:192.168.0.111
Connected to googleads.googleapis.com.:80
2020/07/22 16:43:26 Google Ads API client library config file: C:\Users\shorton\google_ads_php.ini
2020/07/22 16:43:26 Config keys and values:
2020/07/22 16:43:26 ClientID = ******************* (hidden)
2020/07/22 16:43:26 ClientSecret = ******************* (hidden)
2020/07/22 16:43:26 DevToken = ******************* (hidden)
2020/07/22 16:43:26 RefreshToken = ******************* (hidden)
2020/07/22 16:43:26 LoginCustomerID = <empty>
2020/07/22 16:43:26 PrivateKeyPath = <empty>
2020/07/22 16:43:26 DelegatedAccount = <empty>
2020/07/22 16:43:26 Please enter a Google Ads account ID:
102-900-5886
2020/07/22 16:44:36 You will need to enter the URL http://localhost:8080 as a valid redirect URI in your Google APIs Console's project (https://console.developers.google.com/apis/library). Please follow this guide (https://developers.google.com/google-ads/api/docs/oauth/cloud-project) for further instructions.
2020/07/22 16:44:36 Visit the URL for the auth dialog:
https://accounts.google.com/o/oauth2/auth?access_type=offline&client_id=*******************&redirect_uri=http%3A%2F%2Flocalhost%3A8080&response_type=code&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fadwords&state=state
2020/07/22 16:44:36 Running HTTP server in the background at port 8080...
2020/07/22 16:45:02 OAuth code received by the HTTP server handler: *******************
2020/07/22 16:45:03 oauth2: cannot fetch token: 400 Bad Request
Response: {
"error": "redirect_uri_mismatch",
"error_description": "Bad Request"
}
I got the Google Ads API to work with the same client key, secret, and developer token, feel free to let me know if you need me to run it again or anything, I'm going to continue to leave this issue open, and check it every few days.
I wasn't aware this was a dead project, it's still mentioned multiple times in the documentation.
To whichever person sees this, can you ask them to remove the mention of this tool from the documentation?
Perhaps you can save people some time, which may add by replacing references to this unmaintained software by asking them to post questions in the support forum.