开发者

how to test google places apis in localhost and getting the client id

I want to use the places api for getting the places names within a circle 开发者_JAVA技巧in localhost. Does anyone know how to get the client id for localhost?


I'm using Visual Studio and when I debug locally the URL is:

http://localhost:2386/index.html

To connect to Google API I set the following two properties of the Client Id in the API Access tab of the Google API console:

Redirect URIs:          http://localhost:2386/oauth2callback

JavaScript origins:     http://localhost:2386

I'm using the Analytics API but hopefully this will help in your case as well.


I am not sure if this is what you are looking for but a possible workaround could be:

  1. Get to know the IP of your computer (e.g.: http://whatismyipaddress.com/)
  2. Add your IP in this Format (http://xx.xx.xxx.xx/) to the Google Console (https://developers.google.com/console/)
  3. Use the API-Key for testing.

Be sure that your IP doesn't change :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜