US: 911 with the car and live location (RapidSOS), and text-to-911
Built: 2026-11-04.
This is for US operators, and for whoever maintains the code.
What riders and drivers get
In the US, the SOS sheet in both apps offers three things:
- Call 911. As everywhere, calling also raises the SOS. The safety desk sees it, follows the car live, and the rider's trusted contacts get the tracking link.
- Text 911. This is for when speaking is not safe ("Call if you can, text if you can't"). It opens a text to 911 that is already written: that it is an emergency in a ride-hail car, the car (colour, make, model, plate) and a map link to where the phone is. It raises the SOS at the same time. Text-to-911 works only where the local 911 centre accepts texts. Elsewhere the phone network replies that the person should call.
- Alert the safety team only. This works as before.
911 sees the car and where it is (RapidSOS)
When the operator has a RapidSOS account, every SOS also goes to RapidSOS, which shows it on the 911 centre's map next to the call. Uber and Lyft do the same. The alert carries:
- where the phone is;
- who pressed SOS: rider or driver, with their name and phone;
- the other person on the ride;
- the car: make, model, colour and plate;
- where the ride was going;
- the live tracking link.
After that, the car's location goes to RapidSOS every 30 seconds while the incident is open, for up to 30 minutes. The updates stop as soon as the safety desk resolves the incident.
The outcome is recorded on the incident (metadata.rapidsos: delivered or
failed, and the alert id), so the desk can see whether 911 was given the data.
Without an account nothing is sent, and the SOS works as before.
Setting it up
- Admin → Providers → RapidSOS (911 data, US): the client ID and client secret that RapidSOS issues when it onboards the company. RapidSOS onboards each company with an agreement, then sandbox keys and production keys.
- Text-to-911 is on in the US by default (
config.safety.emergency.text=911). Set it tonullto hide the button.
Before launch: send a test alert in the RapidSOS sandbox. This was built to RapidSOS's OAuth and alert contract, and tested here against a local mock only.
Code
backend/src/safety/rapidsos.ts:rapidSosAlert, the alert sent;stillFollowing, which tells whether an SOS is still inside the 30-minute window.
Spec:
rapidsos.spec.ts.backend/src/safety/rapidsos.service.ts:- the OAuth token;
alert, whichIncidentsService.raisecalls for every SOS;followUp, which runs every 30 seconds.
RAPIDSOS_API_BASEpoints it at a mock in development.backend/src/safety/emergency-numbers.ts:text(US: 911), served through/safety/emergency-numbers.Apps:
src/components/SosSheet.tsx(thesos-textbutton), andsrc/lib/emergency.ts(sosTextBody,smsUrl).