Search code examples
google-places-apigoogle-places-autocomplete

What is the correct spelling of the session token parameter for Google Places API requests?


The documentation for the session token for the Google Places API refers to the parameter as both sessiontoken and session_token throughout the document. Which one is correct?


Solution

  • Making a request with both sessiontoken and session_token parameters included results in:

    {
        "error_message": "Invalid request. Only one of the 'sessiontoken' or 'session_token' parameters are allowed.",
        "predictions": [],
        "status": "INVALID_REQUEST"
    }
    

    So apparently either one is acceptable.