How to know if sessionToken was implemented properly?

余生颓废 提交于 2020-04-18 06:04:41

问题


So I'm trying to implement a simple location autocompletion with the google places api. I'm using the autocomplete service for this (see: https://developers.google.com/maps/documentation/javascript/reference/places-autocomplete-service).

What I'm doing right now is, creating an autocomplete token and renewing it if either 3 Minutes ran out (according to How long do the new Places API session tokens last?) or a place detail request was set (according to https://developers.google.com/places/web-service/session-tokens).

Now, I want to debug this and want to know if I did it properly.The dashboard on the google developer console counts every single request made though.

How do I know if it has an effect?|


回答1:


If you implemented session tokens correctly in your application, in your billing report within the Google Cloud Platform Console you should see one or both of the following SKUs:

Autocomplete without Places Details – Per Session
Autocomplete (included with Places Details) – Per Session

If you didn't, you'll see this instead:

Autocomplete – Per Request

Note that this only applies if you use getPlacePredictions(). There are no session tokens for getQueryPredictions().

Hope this helps!



来源:https://stackoverflow.com/questions/59222225/how-to-know-if-sessiontoken-was-implemented-properly

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!