Google API - 使用内部 IP 重定向 URI [英] Google API - Redirect URI with an internal IP

查看:32
本文介绍了Google API - 使用内部 IP 重定向 URI的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Google 日历 API 创建应用.在我的本地 apache 安装上一切正常,使用 localhost:8888/pathtoapp 作为重定向 URI.

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.

我想将应用程序迁移到本地网络上的另一台机器上.我尝试将 URI 更改为新 apache 安装的本地 ip.我收到以下错误...

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/

关于如何使用内部 IP 作为重定向 URI 或其他方式的任何想法?

Any ideas on how I can use an internal IP as a redirect URI or other ways around it?

谢谢.

推荐答案

看起来 API 不允许您使用 IP 地址.尝试使用网络名称而不是 IP 地址.如果您无权访问该名称,请在本地计算机上为该特定 IP 创建别名.

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.

这篇关于Google API - 使用内部 IP 重定向 URI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆