I'm creating an app using Google calendar API. Everything works fine on my local apache install, using localhost:8888/pathtoapp as the redirect URI.
I want to migrate the app to another machine on my local network. I tried changing the URI to the local ip of the new apache install. I get the following error...
Error: invalid_request
Invalid parameter value for redirect_uri: Raw IP addresses not allowed: http://192.168.0.17/pathtoapp/
Any ideas on how I can use an internal IP as a redirect URI or other ways around it?
Thanks.
Looks like the API is not allowing you to use IP addresses. Try to use network name not ip address. If you don't have access to the name, create an alias on your local machine for that specific IP.
[development environment suitable solution]
Whilst the Google Console will not allow you to have an IP as a redirect URI:
Invalid Redirect: http://10.100.1.1 must end with a public top-level domain (such as .com or .org)
you can create a host name entry which redirect you a valid domain to another the desired IP address:
$ vim /etc/hosts
Append:
10.100.1.1 localhost.com www.localhost.com
Now you can access your site from localhost.com
or www.localhost.com
and have localhost.com
as the redirect URI.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With