To track charging sessions on a Tesla Model Y, query recharge segments from the DIMO Telemetry API and read the charging signals for the same time range. On a Tesla Model Y (2020 and newer), the Tesla connection (OEM cloud, no hardware) reports charging status, session energy in kWh, charge limit and state of charge in %.
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.
See the full signal list on the Tesla Model Y vehicle page. For any other vehicle, see how to track EV charging sessions.
Steps
- Create a Developer License in the Developer Console and generate an API Key. You need your Client ID, Redirect URI and API Key.
- Get a Developer JWT. You can use the system-generated one in the Developer Console, or generate one with your API Key through a server SDK.
- Get the Model Y shared with your app through DIMO Connect.
- Exchange your Developer JWT for a Vehicle JWT through the Token Exchange API. Request privilege 1 (all-time, non-location data) and privilege 4 (all-time location), because the
segmentsquery needs both. - Send the Vehicle JWT in the
Authorizationheader of a Telemetry API request, in the formAuthorization: Bearer <Vehicle JWT>. - Query
segmentswithmechanism: rechargeover a range of up to 31 days. Recharge detection is hybrid: it uses charging signals and state of charge. Each segment returns start and end times, duration, and whether it is ongoing. - Request signal aggregates per segment with
signalRequests. For the Model Y,powertrainTractionBatteryChargingAddedEnergy(Session Energy, kWh) andpowertrainTractionBatteryStateOfChargeCurrent(Current Charge Level, %) are signals the Tesla connection reports. TheMAXaggregation gives the highest session energy reading, andLASTgives the charge level at the end of each session. - To see how the Model Y was charging, read
powertrainTractionBatteryChargingChargeCurrentAC(AC Current Charge, amps) andpowertrainTractionBatteryChargingChargeVoltageUnknownType(Charging Voltage, volts). The Tesla connection reports both on this car. - To check the live state, call
signalsLatestand readpowertrainTractionBatteryChargingIsChargingandpowertrainTractionBatteryChargingIsChargingCableConnected.
Code
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 }
}
}
Replace 12345 with your vehicle's token ID and send the Vehicle JWT as a Bearer token: { "Authorization": "Bearer <yourVehicleJwt>" }.
To run this against a real Model Y, sign in to the Developer Console for a Developer License, then work through the authentication guide.
FAQ
Which Model Y connection reports charging data?
On a Tesla Model Y, the Tesla connection reports charging status, cable connected, session energy (kWh), charge limit (%), charging voltage (volts) and AC charge current (amps). It covers model year 2020 and newer and needs no hardware.
How do I know if a charging session is still running?
Each segment has an isOngoing field. It is true when the session extends beyond the end of your query range, and in that case end is not included.
How far back can I query sessions?
The segments query supports a maximum date range of 31 days per request. Use limit (default 100, maximum 200) and after to page through results.
Can I read the current charge state without segments?
Yes. Query signalsLatest for powertrainTractionBatteryChargingIsCharging and powertrainTractionBatteryStateOfChargeCurrent to get the most recent values.
Methodology: based on the DIMO documentation for Authentication, Building Your First App, and the Telemetry API Signals and Segments references, and on the Tesla Model Y vehicle page.