Get current user
Automatically get current user on sncf-connect.com. Report which SNCF Connect account this browser is signed in as: name and email from the account's personal-info page. Being signed out is reported as a normal answer (loggedIn false), not an error, so it can be used to check a session before running other SNCF Connect scripts.
Input
None
Output
loggedIn requiredname optionalemail optionalFAQ
Cancel a pending SNCF Connect train option (pre-reservation)
Cancels a pending free option (pre-reservation) on SNCF Connect, releasing the hold it placed on a train's price and seat. Defaults to a dry run: it reports the option it would cancel and backs out without touching it. Pass confirm=true to actually cancel, which is irreversible — the blocked price is lost. When more than one option is pending, `match` picks the right one by part of its destination and/or travel date. Requires being signed in to SNCF Connect. Runs only via the local browser extension, not the hosted cloud browser.
Remove train ticket from SNCF Connect cart
Remove a specific train ticket from the SNCF Connect cart (or the only one if there's just one). Requires login. Pass `match` (substring of origin/destination, e.g. "Bordeaux") to pick which item when the cart has several; omitted `match` is fine only when exactly one item is in the cart. Confirms the site's own removal dialog. To empty the whole cart, call once per item. Runs only via the local browser extension, not the hosted cloud browser.
Book SNCF Connect train ticket (cart only, cancellable fares)
Add a train ticket to the SNCF Connect cart — never proceeds to payment, stopping right after the ticket lands in the cart. Safety gate: only fares cancellable or refundable free of charge at booking time are eligible. Picks the cheapest eligible fare of the requested comfort class, on the train matching departureTime (or the cheapest eligible across all trains if omitted). Requires login. Runs only via the local browser extension, not the hosted cloud browser.
