You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my auth.ini I have filled out developerToken (approved), userAgent, client_id and client_secret. When I run GetRefreshToken.php I get:
# php GetRefreshToken.php
Log in to your AdWords account and open the following URL:
https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=54xxxxxxxxx62-t9uet6fpdq7c1j0ml93bfksm5ga36ed8.apps.googleusercontent.com&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&scope=https%3A%2F%2Fadwords.google.com%2Fapi%2Fadwords%2F&access_type=offline
After approving the token enter the authorization code here:
Notice the client_id in the URL is NOT my client ID. The first dozen or so character is correct. But after that its totally different. When I paste in this URL (while logged into my Adwords account) I get this screen:
At first I assumed maybe the client_id in the URL was some hashed value or something so I didn't think anything of it. But after not being able to figure out a reason for why I was getting this error, my friend suggested changing the URL to my correct client_id. And presto... that worked. I sent me to the page that says:
This app would like to: Manage your AdWords campaigns
I accept this and now it gives me my Refresh Token.
So what is going on here? Is this a bug? Am I misunderstanding something? I could not find the above (wrong) client_id hardcoded anywhere in the PHP library so I'm not sure where it's coming from.
The text was updated successfully, but these errors were encountered:
Can you double check your auth.ini file again to ensure the client ID matches up and that the example is loading the correct auth.ini file? I am unable to reproduce this. If you can reproduce this issue, please outline the steps and I will look into it.
Okay this was an oversight on my part. I thought my project was loading a local version of the library but it was actually loading the library that was installed globally on the server. So all is well there.
However, how do you install this project only local to a project? We have multiple projects on the same server that all need to use different Adwords credentials. But if there is only one auth.ini available via the globally installed library...... How do we deal with this?
In the future, please post questions about client library usage on the API forums linked above instead of opening new issues. This helps us better track tickets (using the forums).
In the Google API Console, I have created a new Installed Application. The client ID is (obfuscated):
54xxxxxxxxx62-n5238beunu5g6qvbxxxxxxxxxxxxxxxxx.apps.googleusercontent.com
In my
auth.ini
I have filled outdeveloperToken
(approved),userAgent
,client_id
andclient_secret
. When I runGetRefreshToken.php
I get:Notice the
client_id
in the URL is NOT my client ID. The first dozen or so character is correct. But after that its totally different. When I paste in this URL (while logged into my Adwords account) I get this screen:At first I assumed maybe the
client_id
in the URL was some hashed value or something so I didn't think anything of it. But after not being able to figure out a reason for why I was getting this error, my friend suggested changing the URL to my correct client_id. And presto... that worked. I sent me to the page that says:This app would like to: Manage your AdWords campaigns
I accept this and now it gives me my Refresh Token.
So what is going on here? Is this a bug? Am I misunderstanding something? I could not find the above (wrong) client_id hardcoded anywhere in the PHP library so I'm not sure where it's coming from.
The text was updated successfully, but these errors were encountered: