PHP - Getting redirect_uri_mismatch error while generating refresh token.

66 views
Skip to first unread message

Pavan V

unread,
Feb 20, 2019, 8:46:40 AM2/20/19
to AdWords API and Google Ads API Forum
Hello There,

I'm using PHP, and I'm getting "redirect_uri_mismatch", "400 Bad Request" error when I try to create a refresh token. The screenshots of code and command promt are attached below.

And how can I integrate this with CodeIgniter? Providing a link for this would be very helpful.

ManyThanks.
adwordsAPI_redirectURLmismatch2.png
adwordsAPI_redirectURLmismatch.png

googleadsapi...@google.com

unread,
Feb 20, 2019, 2:04:29 PM2/20/19
to v.p...@ailabs.in, AdWords API and Google Ads API Forum
Hello Pavan,

The redirect_uri_mismatch error usually occurs when the wrong type of credentials used in the program and the redirect_uri is not matching with the one specified in the API console for web application type. You could refer this guide to create the client ID and client Secret for Web flow and update the redirect URI. Please give it a try and let me know if you are still facing the issue.

Our client library codes are meant to run from command line but not as web pages. Since, PHP Codeigniter is a third party application you have to find a way to call the PHP programs from that software and use the out come results. 

Regards,
Sai Teja, AdWords API Team






=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    http://googleadsdeveloper.blogspot.com/search/label/adwords_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Reply all
Reply to author
Forward
0 new messages