Hier ein Beispiel für den Text einer cURL-Anfrage für eine Route mit einem Start- und einem Zielort. Dabei werden Feldmasken verwendet, um ein Routen-Token sowie die Dauer, Entfernung und die Routenpolylinie anzufordern:
[null,null,["Zuletzt aktualisiert: 2025-02-06 (UTC)."],[[["To get a route token from the Routes API, you must set `travelMode` to `DRIVE` and `routingPreference` to either `TRAFFIC_AWARE` or `TRAFFIC_AWARE_OPTIMAL`."],["Ensure that none of your route waypoints are via waypoints when requesting a route token."],["Use the `routes.routeToken` field mask in your request to ensure that a route token is returned."],["The route generated with a token may vary slightly from the planned route due to dynamic road conditions, and it's recommended to use the token soon after generation."],["The route token can be used in the Navigation SDK for your planned route."]]],["To obtain a route token from the Routes API, set `travelMode` to `DRIVE` and `routingPreference` to `TRAFFIC_AWARE` or `TRAFFIC_AWARE_OPTIMAL`. Ensure no waypoints are \"via\" waypoints. Include `routes.routeToken` in the `X-Goog-FieldMask`. Use the token promptly, as dynamic road conditions can cause deviations. The token can be used in the Navigation SDK. An example cURL request demonstrates how to request a token with other route data.\n"]]