Another redirect_uri_mismatch

275 views
Skip to first unread message

Graham Bentin

unread,
Jun 25, 2018, 7:17:53 AM6/25/18
to AdWords API and Google Ads API Forum
Hi Guys,

I've created a dotnet core web app using the adwords api, following the instructions in your excellent video series presented by Xerxes and its working perfectly from https://localhost:44307

However having deployed it onto our staging server I'm getting the following error

Request details

response_type=code
client_id=<my client key>
redirect_uri=https://reach.hpsgroup.co.uk/signin-google
scope=openid profile email
state=CfDJ8AZVBrSG6w9GogCKPajG8lj85KpAUp6SDsYBcwJyTaCLrdd3-ijA_X2fxgfmoMzfwv4QQRW-W3vJMrNwN2rLAygRtkc23e7-MXcGelbwRRqvMu36Rd1PwbJAc9CEIVkfMWYu_0ep4sO3yyogURkoHxtwoRic8C8rXa8kM7QmVZeVlvqcXPK-c8MY-xYuC1-GSBDwiEcO09aMj8tfTYcEhLovEE1pMGomLgLFstvsSQXlprwsHfpMQnWN7RyPokhGXeHffSq6rZ-8TOst6uB_JtSGKUME3CB6cB8Gv1gH41Ce
That’s all we know.

Reading all past information on the subject I should add additional 'Authorised redirect URIs' found under the Application Type - Web Application within the 'Create oAuth client ID'. What I am confused about is during video 'Adwords APi Episode 2' Xerxes states the installed application type should be 'Other' which doesn't offer any input fields to enter 'Authorised redirect URIs'

Am I missing something or is this error caused by the dotnet core configuration at the server end where a reverse proxy is established between IIS and Kestrel server?

Any help much appreciated
Graham

Milind Sankeshware (AdWords API Team)

unread,
Jun 25, 2018, 3:00:31 PM6/25/18
to AdWords API and Google Ads API Forum
Hi Graham,

Since you are using the Web app type of OAuth setup, you will need to set the valid redirect URI in the credentials page of the Google API Console. Please read this guide on OAuth for setting the redirect URI while using the web application. If you are going to follow the OAuth setup in the staging server too, you will need to have a valid URL in that context instead of localhost. Ideally, you will have to make sure that the redirect URL for the credentials of type Web is set correctly in the Google API Console Credentials page and it matches the one set in your code. If it is not same, could you please update this and retry? If you would like to confirm the application type that is best suited for you, please check this guide. If you feel that web application is the right fit for you, you will need to choose "Web application" while creating the client credentials in the Google Developers console page. Let me know if you have any further questions.

Thanks,
Milind, AdWords API Team.
Reply all
Reply to author
Forward
0 new messages