Server quickstart
One Dart program on the VM: mint a session token, list your itineraries, and route a hike from Chamonix to Argentière.
You need Dart 3.10 or newer, the one Flutter carries included. Create a publishable key with the publishing and data scopes and a secret key, both under Organization → API keys in the Mountaya app.
Replace bin/trail_server.dart with this:
Importing mountaya_admin adds admin to the client. Run it with dart run.
Every other call sends the publishable key with the token:
An app never holds the secret key. Your server mints a token for its signed-in user on each request:
The app keeps its token fresh by calling this route, as Authentication in the SDK shows.