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:
- Get to know the IP of your computer (e.g.: http://whatismyipaddress.com/)
- Add your IP in this Format (http://xx.xx.xxx.xx/) to the Google Console (https://developers.google.com/console/)
- Use the API-Key for testing.
Be sure that your IP doesn't change :)
精彩评论