To track EV charging sessions, query the DIMO Telemetry API segments resource with mechanism: recharge. DIMO gives developers API access to vehicle-state data: diagnostics, fault codes, battery and fuel health, odometer, and maintenance signals. Recharge detection is a hybrid method that uses charging signals and state of charge, and it returns each session as a segment with start and end times and locations.\n\n## Steps\n\n1. Create a Developer License and get a Developer JWT. You need your Client ID, Redirect URI, and API Key. Generate the Developer JWT in the Developer Console or with a server SDK.\n2. Get a vehicle shared with you. The documentation says you need a vehicle shared with you to fetch a Vehicle JWT, and it points to DIMO Connect for vehicle sharing.\n3. Exchange your Developer JWT for a Vehicle JWT by sending a request to the Token Exchange API. In the request, include the vehicle tokenId and the permissions you need. The documented permission options include all-time non-location data, current location, and all-time location.\n4. Send your Vehicle JWT in the Authorization header of a request to the Telemetry API.\n5. Call the segments query with the vehicle tokenId, a from and to range of at most 31 days, and mechanism: recharge.\n6. Optionally tune detection with config.minIncreasePercent, which sets the minimum percent increase within a window to count as a level-increase window. The default is 15. You can also set minSegmentDurationSeconds (default 240) to filter very short segments.\n7. Read the response. Each segment includes start and end with timestamp and location, duration in seconds, isOngoing, and startedBeforeRange. If isOngoing is true, end is null because the session extends beyond your query range.\n8. Page through results with limit (default 100, max 200) and after. Pass the start timestamp of the last segment from the previous page as after.\n\n## Code\n\nThis query is adapted from the documented segments example. It uses the recharge mechanism and needs a Vehicle JWT in the Authorization header. Replace the token ID and time range with your own values.\n\ngraphql\nquery GetChargingSessions {\n segments(\n tokenId: 117315\n from: "2025-11-01T09:21:19Z"\n to: "2025-11-07T09:21:19Z"\n mechanism: recharge\n config: { minIncreasePercent: 15 }\n limit: 50\n ) {\n start {\n timestamp\n value { latitude longitude }\n }\n end {\n timestamp\n value { latitude longitude }\n }\n duration\n isOngoing\n startedBeforeRange\n signals { name agg value }\n }\n}\n\n\n## FAQ\n\n### Which detection mechanism finds EV charging sessions?\n\nUse recharge. The documentation describes it as hybrid detection that uses charging signals and state of charge.\n\n### What does the response include for each session?\n\nEach segment includes start and end timestamps with location, duration in seconds, isOngoing, startedBeforeRange, and any requested signal aggregates or event counts. For refuel and recharge segments, the default signal set also includes the level signal at start and end.\n\n### How long a time range can I query?\n\nThe maximum date range for a segments query is 31 days. Use limit and after to paginate through results within that range.\n\n### How do I see the current battery and charging signals for a vehicle?\n\nThe Telemetry API signalsLatest and signals queries return signal data, and the signals documentation lists a Battery & Charging category. Check the signal list for the specific fields available.\n\n### Do I need the vehicle owner's permission?\n\nYes. Vehicle owners consent to and control sharing, so builders get data with clear provenance. You need the vehicle shared with you before you can fetch a Vehicle JWT.\n\nMethodology: This guide is based on the DIMO documentation pages for Authentication, Building Your First App, and the Telemetry API references for Vehicle Segments and Vehicle Signals.