API AdWords Ошибка 400

90 views
Skip to first unread message

kosty...@gmail.com

unread,
Aug 22, 2016, 6:11:44 AM8/22/16
to AdWords API Forum
Здравствуйте, подскажите пожалуйста, почему при запросе токена от веб приложения может появляться ошибка 400 ? Error: redirect_uri_mismatch

Joyce Lava

unread,
Aug 22, 2016, 6:38:12 AM8/22/16
to AdWords API Forum
Hello,

Apologies as I can only respond in English. This error happens when you have some issues in the setup of the OAuth2. Could you please double check this guide and follow the steps carefully once again? After this, based on the client library you are going to use, please perform the steps to generate refresh token. 

Thanks,
Joyce, AdWords API Team

kosty...@gmail.com

unread,
Aug 22, 2016, 7:07:04 AM8/22/16
to AdWords API Forum
Joyce спасибо за ответ. По данному руководству и делал все, в итоге через командную строку и Installed app все работает, а когда создаешь второе приложение и меняешь данные на принадлежащие ему, то происходят проблемы. С английским языком плохо и приходиться работать с переводчиком. Подскажите на какой URL нужно сделать переадресацию, и есть ли возможность работать через JSON и HTTP заголовки ? Огромное вам спасибо.

понедельник, 22 августа 2016 г., 14:11:44 UTC+4 пользователь kosty...@gmail.com написал:

Joyce Lava

unread,
Aug 22, 2016, 10:33:18 PM8/22/16
to AdWords API Forum
Hello,

Could you please confirm if my understanding is correct? When you performed the OAuth2 steps selecting "installed app", the application works fine. However, you encountered the error "redirect_uri_mismatch" when you are doing the steps for your second application. Could you please confirm what specific step you are doing when you encountered this error? Is the error encountered when doing the guide for OAuth2 Playground? If yes, have you tried clicking the button "Authorize APIs" again? 

Additionally, could you please clarify if you want to setup a service account using JSON?

kosty...@gmail.com

unread,
Aug 23, 2016, 1:31:10 AM8/23/16
to AdWords API Forum
Для "установленного приложения" все работает хорошо а когда по этим же шагам создаю веб-приложение то при запросе токена возникает данная ошибка.
Спасибо!

вторник, 23 августа 2016 г., 6:33:18 UTC+4 пользователь Joyce Lava написал:
Здравствуйте,

Не могли бы вы подтвердить , если я правильно понимаю? Когда вы выполнили шаги OAuth2 выбора "установленного приложения", приложение работает отлично. Тем не менее, вы столкнулись с ошибкой "redirect_uri_mismatch" , когда вы делаете шаги для вашего второго приложения. Не могли бы вы подтвердить , что конкретный шаг , который вы делаете , когда вы столкнулись с этой ошибки? Встречается ошибка при выполнении руководство для  oauth2 площадка ? Если да, то вы пробовали , нажав на кнопку "Авторизовать API - интерфейсов" снова? 

Кроме того, не могли бы вы уточнить , если вы хотите , чтобы настроить  учетную запись службы с  помощью JSON?

Благодаря,
Джойс, команда AdWords API

Joyce Lava

unread,
Aug 23, 2016, 2:34:42 AM8/23/16
to AdWords API Forum
Hello,

Thanks for the clarification. Could you please reply privately to author the SOAP request and response when this error occurs? This will help me check the issue further. Also, if you are using web app as the app type, make sure that you are logged in as the AdWords account that you wished to setup the web app.

kosty...@gmail.com

unread,
Aug 23, 2016, 2:51:33 PM8/23/16
to AdWords API Forum
Joyce, я авторизован в системе в качестве моей учетной записи AdWords, не совсем понял фразу "Could you please reply privately to author the SOAP request and response when this error occurs?", извините за мой английский =( 
Огромное Вам спасибо, за то что помогаете мне.

вторник, 23 августа 2016 г., 10:34:42 UTC+4 пользователь Joyce Lava написал:

Joyce Lava

unread,
Aug 23, 2016, 11:25:39 PM8/23/16
to AdWords API Forum
Hi,

Apologies for the confusion. I was asking if you could send me (reply privately to author) the logs shown when you copied the URL in the browser to generate the refresh token. Also, could you please confirm if you are using another AdWords account when you generate the new project with app type as web app? I ask this because I need to confirm if you are using the same AdWords account for the project with installed app and the project with web app. 

If you are using the same account, could you please try doing the steps for web app project using another AdWords account and let me know if this solves the issue? Also, if you are doing the web app, you should follow the steps for the web app flow which includes entering the JavaScript origins, redirect URIs or both then define your CALLBACK_URL in the GetRefreshToken. Hope this helps.
Message has been deleted

kosty...@gmail.com

unread,
Aug 24, 2016, 1:15:27 AM8/24/16
to AdWords API Forum
Joyce, огромное вам спасибо, проблема была в том, что в файле GetRefreshToken.php не правильно указал URL. Остался последний вопрос, не могли бы вы прислать мне, пример для работы с компаниями AdWords на PHP через HTTP заголовки JSON, если у вас такой есть? Буду Вам очень сильно благодарен. И еще раз Вам огромное спасибо, очень помогли. Вот моя почта: kosty...@gmail.com

среда, 24 августа 2016 г., 7:25:39 UTC+4 пользователь Joyce Lava написал:

Joyce Lava

unread,
Aug 24, 2016, 1:51:06 AM8/24/16
to AdWords API Forum
Hi,

Glad to hear that I was able to help. For your second question about PHP, I'm not sure if I understand correctly about what you meant by "company" with AdWords API examples. However, this link provides the example codes of the PHP client library. You may download the latest version here and run through the example codes that may fit your needs.

Best,
Joyce, AdWords API Team

kosty...@gmail.com

unread,
Aug 24, 2016, 4:22:38 AM8/24/16
to AdWords API Forum
Joyce, мне необходимо брать данные из AdWords и заносить их в базу данных на своем сайте, как можно запустить файлы данной библиотеки через HTTP или JSON ? Извините, но я не могу найти информацию по этому поводу в документации.
среда, 24 августа 2016 г., 9:51:06 UTC+4 пользователь Joyce Lava написал:

Joyce Lava

unread,
Aug 24, 2016, 4:37:18 AM8/24/16
to AdWords API Forum
Hello,

Since this is a new question, could you please post in a new thread?

kosty...@gmail.com

unread,
Aug 24, 2016, 5:19:57 AM8/24/16
to AdWords API Forum
Хорошо, спасибо Вам.

среда, 24 августа 2016 г., 12:37:18 UTC+4 пользователь Joyce Lava написал:
Reply all
Reply to author
Forward
0 new messages