To track charging sessions on a Tesla Model 3, query the DIMO Telemetry API for recharge segments and request the charge level signal for each one. On a Tesla Model 3 (2018 and newer), the Tesla connection (OEM cloud, no hardware) reports charging status, session energy in kWh and charge level in %, so you can describe each session in detail.
DIMO gives developers API access to vehicle-state data: diagnostics, fault codes, battery and fuel health, odometer, and maintenance signals. Vehicle owners consent to and control sharing, so builders get data with clear provenance. The signals listed for this car are on the Tesla Model 3 vehicle page. For any other vehicle, see how to track EV charging sessions.
Steps
- Create a Developer License in the Developer Console and note your Client ID, Redirect URI and API Key. Then get a Developer JWT. You can use the system-generated Developer JWT, or generate one with your API Key.
- Get the Model 3 shared with your app. The owner shares it through DIMO Connect.
- Exchange your Developer JWT for a Vehicle JWT by sending a request to the Token Exchange API with the vehicle's token ID and the permissions you need. Request privilege 1 (all-time, non-location data) and privilege 4 (all-time location). The
segmentsquery requires both. - Query the
segmentsresource of the Telemetry API withmechanism: recharge. Pass the vehicle token ID and a time range of at most 31 days. Recharge detection uses charging signals and state of charge. By default it also returns the level signal at the start and end of each segment. - Add
signalRequeststo enrich each session. On the Model 3, the Tesla connection reportspowertrainTractionBatteryChargingAddedEnergy(Session Energy, kWh) andpowertrainTractionBatteryStateOfChargeCurrent(Current Charge Level, %). The example usesMAXfor session energy andLASTfor charge level. - Read each segment's
start,end,durationandisOngoingfields. IfisOngoingis true, the session extends past your query range andendis not returned. - For the live state of a session, query
signalsLatestforpowertrainTractionBatteryChargingIsCharging(Charging Status) andpowertrainTractionBatteryChargingIsChargingCableConnected(Charging Cable Connected). Both are reported as 0 or 1, so you can tell a plugged-in Model 3 from one that is actively charging.
Code
This GraphQL query lists recharge sessions with the highest session energy reading and the last charge level reading in each one. Send it with the header Authorization: Bearer <Vehicle JWT>. Replace 12345 with your vehicle's token ID and the dates with your own.
query GetRechargeSessions {
segments(
tokenId: 12345
from: "2026-11-01T00:00:00Z"
to: "2026-11-07T00:00:00Z"
mechanism: recharge
signalRequests: [
{ name: "powertrainTractionBatteryChargingAddedEnergy", agg: MAX }
{ name: "powertrainTractionBatteryStateOfChargeCurrent", agg: LAST }
]
limit: 50
) {
start {
timestamp
}
end {
timestamp
}
duration
isOngoing
startedBeforeRange
signals { name agg value }
}
}
Ready to try it? Get a Developer License in the Developer Console, then follow the authentication guide.
FAQ
Which Tesla Model 3 signals describe a charging session?
The Tesla connection reports Session Energy (kWh), Current Charge Level (%), Charging Status, Charging Cable Connected, Charge Limit (%), Charging Voltage (volts), AC Current Charge (amps) and Battery Power (watts). Their DIMO names are listed on the Tesla Model 3 vehicle page.
How do I get the current charging status instead of past sessions?
Use the signalsLatest query with the Vehicle JWT and request powertrainTractionBatteryChargingIsCharging. Include value and optionally timestamp in the selection.
How far back can I query charging sessions?
The segments resource accepts a maximum date range of 31 days per query. It returns 100 segments by default and up to 200 per request, and you can page with the after argument.
Do I need the owner's permission?
Yes. You need the vehicle shared with you to fetch a Vehicle JWT, and you request specific permissions in the token exchange. For segments, those are privileges 1 and 4.
Methodology: This guide is based on the DIMO documentation for Authentication, Building Your First App, and the Telemetry API Segments and Signals references, plus the Tesla Model 3 vehicle page.