Search code examples
iosrestsessiontokengoogle-places-api

How to generate Google Place API session token?


I'm using Google Places Autocomplete API, and I need to add a session token so I won't get charged per letter. the documentation doesn't say much. Can I just use a random unique string as a session token?


Solution

  • Yes, you can use anything as a session token. It could be "dog", "01234" etc. Google recommends red frame to use UUID v4 to generate this random strings.