Skip to main content
Solved

Can we get access to the OVO energy online account API to download our smart meter usage data?

  • March 9, 2017
  • 214 replies
  • 35550 views

Show first post

214 replies

  • Newcomer
  • October 3, 2025

@Firedog, sorry but I am Octopus Agile these days, so I am no longer maintaining my OVO API.


Firedog
Super User
Forum|alt.badge.img+7
  • Super User
  • October 3, 2025

​If I find a way of fixing it I’d have a go but I don’t know if I’ll be able to test it.
  

Thanks so much for reacting 🙇‍♂️

I’ll happily act as your proxy if you could manage testing at arm’s length.

 

 


MikeWilliams
Newcomer
Forum|alt.badge.img
  • Newcomer
  • October 3, 2025

I have had a quick look and it looks like they have changed to using OAuth for logging in.

I need to do some research to find out how to integrate with it.

I will post back when I have been able to fix my app.


  • Newcomer
  • October 4, 2025

I’ve done a bit of investigation. I can’t remember what it was like before so can’t say how it has changed, but the summary points are:

  • The auth doesn’t look to be OAuth, but is a combination of a request to login which sets a cookie, then “refresh” requests which use the cookie to get an auth token.
  • The refresh requests issue a token which is valid for 60 seconds. There doesn’t seem to be any replay prevention, so you can keep sending this request. I haven’t tested if it keeps working forever or stops after a period. If it does expire, there is probably a better way to “refresh”.
  • The auth token provided by the refresh endpoint is then used as a Bearer token in the authorization header.
  • There are some RPC style API requests, but most now seem to be using GraphQL. In theory this allows more control over querying, but I didn’t look  into that and just copied the queries the website was using.
  • The GraphQL queries seem to run at different at 2 different domains. The auth token works for both so doesn’t seem to have much effect, but worthy of note.

I used Restfox to test the requests. The workspace export can be found here: https://www.dropbox.com/scl/fi/5jxqer5cxlpzrpa5ouv0b/ovo.restfox.json?rlkey=5ni0j5j6olyu3jvkr3dhqm1ot&st=1j7497eo&dl=0

  1. Download the desktop app for the best experience. It may work in the browser version, but will require the CORS extension, and I haven’t tested it there.
  2. In a new workspace, import the linked file above.
  3. Open the environment settings from the button in the top right, then add JSON keys for “username” and “password” with your account details. Note: Some symbols may not work correctly, in the JSON. If that’s the case, you’ll need to change your password.
  4. Run the requests. You first need to run Login, Get Token and Bootstrap IN THAT ORDER. They retrieve some information which is required for the other requests.
  5. When your token expires after 60 seconds, you’ll need to refresh it by running Get Token again. To simplify this, use the dropdown next to the “Send” button to enable “Repeat on interval”. Set it to 45s and it should keep refreshing before the previous token expires.

Edit: There is a GrapQL request type in Restfox, but I don’t have any experience with GraphQL so used a copy paste approach from browsing the website. Feel free to provide an updated version if you work it it.


MikeWilliams
Newcomer
Forum|alt.badge.img
  • Newcomer
  • October 4, 2025

That's strange as when I was first informed of the bug I used postman to send the login request and I remember seeing the tel tale signature of a JWT in the response.


Firedog
Super User
Forum|alt.badge.img+7
  • Super User
  • October 5, 2025
  • The auth doesn’t look to be OAuth ...
      

This is the response I get in Edge 142 to a failed request:

{"message":"OAuth plugin - No refresh_token present"}

 


MikeWilliams
Newcomer
Forum|alt.badge.img
  • Newcomer
  • October 5, 2025

I have been experimenting this afternoon and with the assistance of the description of the flow from ​@g-de I have made some progress.

Sadly I couldn't get RestFox to work in FireFox so have to code it up one call at a time.


  • Newcomer
  • October 5, 2025
  • The auth doesn’t look to be OAuth ...
      

This is the response I get in Edge 142 to a failed request:

{"message":"OAuth plugin - No refresh_token present"}

 

Is that one of the data endpoints? The error message may be misleading. The auth flow doesn’t match what I’ve seen for oauth, however, the way in which the auth token is passed to the endpoints is the same.

The error message may be a side-effect of the backend software being used.


  • Newcomer
  • October 5, 2025

I have been experimenting this afternoon and with the assistance of the description of the flow from ​@g-de I have made some progress.

Sadly I couldn't get RestFox to work in FireFox so have to code it up one call at a time.

There is an option to export to a poastman collection if that’s easier? I won’t be able to test it though. I tend not to use postman as I’ve had it just refusing to start on multiple machines.

I was just copy pasting from the network diagnostics in my browser with some slight adjustments for variables and such. If you get stuck with any calls let me know and I’ll try post just the relevant bits.


MikeWilliams
Newcomer
Forum|alt.badge.img
  • Newcomer
  • October 6, 2025

Thanks all I now have a working set of postman scripts which I can translate into C# for my app.

 

Regards

Mike Williams


  • Newcomer
  • October 6, 2025
  • The auth doesn’t look to be OAuth ...
      

This is the response I get in Edge 142 to a failed request:

{"message":"OAuth plugin - No refresh_token present"}

 

Ironically I've just seen this error but when browsing the ovo website. It seems “Download bill” is broken at the moment (for me at least) 😂


Firedog
Super User
Forum|alt.badge.img+7
  • Super User
  • October 6, 2025

It seems “Download bill” is broken at the moment (for me at least) 😂
   

You might find that it depends on how you interact with the link. For me, a simple click on it works to trigger the download. Trying to open it in a new tab or window, or using the Save link as … option, only result in the error aforementioned, recorded as an HTTP 401 ‘Unauthorized’.


  • Newcomer
  • October 6, 2025

It seems “Download bill” is broken at the moment (for me at least) 😂
   

You might find that it depends on how you interact with the link. For me, a simple click on it works to trigger the download. Trying to open it in a new tab or window, or using the Save link as … option, only result in the error aforementioned, recorded as an HTTP 401 ‘Unauthorized’.

This was on mobile just tapping the button. I tried it a few times and on different bills.

I just needed the MPAN which I managed to find on an old paper bill.


Firedog
Super User
Forum|alt.badge.img+7
  • Super User
  • October 7, 2025

  

This was on mobile just tapping the button.
  

OK. Yes, I see the same when visiting the site in a browser. The OVO Energy app skates round the problem by actually rendering the PDF instead of the web-page-like billing details page. 
 


Nukecad
Super User
Forum|alt.badge.img+4
  • Super User
  • October 7, 2025

 

….. It seems “Download bill” is broken at the moment (for me at least) 😂

 

I had that issue last week and found that turning of both of my Adblockers then allowed the Downloading of the bill.


  • Newcomer
  • October 8, 2025

OVO changes the authorization method for the Smart PAYM API 

  

People may have noticed that utilities like the ones described in this thread aren’t working these days. It looks like there was a fundamental change in the way that authorization works for the API. This sort of stuff sadly goes right over my head, but apparently it’s no longer enough to have the browser cache an access token; it actually has to be sent with each request. Developers out there will hopefully know how to deal with this, so over to ​@MikeWilliams, ​@Tron Burgundy, ​@nickcmaynard, ​@knight, ​@TerryE , ​@g-de and anyone else I’ve omitted, just in case they can be bothered to address this insofar as it affects their various code.

 

Have - hopefully - fixed https://github.com/nickcmaynard/ovo-energy-usage-scripts to handle the refresh token fun and games.  No longer an Ovo customer, but I hope this will help folks out.


MikeWilliams
Newcomer
Forum|alt.badge.img
  • Newcomer
  • October 8, 2025

I have just finished the changes to my app for the new login and authentication methods.

I have some more testing to do before I release it.

I have today downloaded all of my data, which goes back to 2017 in a single pass.


MikeWilliams
Newcomer
Forum|alt.badge.img
  • Newcomer
  • October 9, 2025

I have just released V1.0.4

You can download a copy of it at
https://github.com/MikeWilliams-UK/My-Ovo-Data/releases

 

Regards

Mike Williams


  • Newcomer
  • October 9, 2025

I have just released V1.0.4

You can download a copy of it at
https://github.com/MikeWilliams-UK/My-Ovo-Data/releases

 

Regards

Mike Williams

Thank you ​@MikeWilliams , just tried it and got all my data since we opened the account.

Out of interest, is there any way to get the data for this smart meter from the last 400 days as has been mentioned by some previously?

 

Thanks!


MikeWilliams
Newcomer
Forum|alt.badge.img
  • Newcomer
  • October 9, 2025

Unzip to a folder of your choice.
Create folder C:\ProgramData\OvoData.
Run the program OvoData.exe

If you want to turn off of dumping of responses change the following value in appSettings.json to from true to false

{    "DumpData": "true"}
 

If you encounter any problems please post on this topic OVO Energy Forum


MikeWilliams
Newcomer
Forum|alt.badge.img
  • Newcomer
  • October 9, 2025

Just to make things clear do not change any other lines in the file appsettings.json

The forum system messed up my formatted code block :-)


Ben_OVO
Community Manager
Forum|alt.badge.img+4
  • Community Manager
  • October 10, 2025

Thanks for the update ​@MikeWilliams!


Firedog
Super User
Forum|alt.badge.img+7
  • Super User
  • October 10, 2025

I have just released V1.0.4
  

@MikeWilliams Thanks for all your hard work on this 🙂

I downloaded the new version, but running it didn’t go as smoothly as I’d hoped.

Spec: Windows 11 Pro  25H2, OS build 26200.6725, Windows Feature Experience Pack 1000.26100.253.0

I had to install .NET Core 8.0.20 to get anywhere - a bit surprised it was missing. Authentication works like a dream, whether or not I was already signed in to the account or not, so that’s the major hurdle successfully navigated 👍

I successfully read the All time dataset, but the date picker was dead, so I wasn’t able to select a period to export. It was stuck at 2017-03-10 - 2025-07-01. I could only find these dates in the .db database, so I renamed it and hoped to be able to start from a clean slate. No such luck - the Read function re-downloaded the whole dataset as before, but there was still no way to tame the export (I tried both types). Even though I specify This Month, I still get the whole lot in the CSV file (131,437 lines, 3.7MB!), and the dates in the dialogue now stubbornly show  2025-10-01 - 2025-10-08. Any suggestions?

It looks like I can attach files here, so if you’d like logs or anything, shout.
 


MikeWilliams
Newcomer
Forum|alt.badge.img
  • Newcomer
  • October 10, 2025

@Firedog - Export is (and was) designed to always export the full data set.

The dates that you are seeing on the screen is the range of dates for which data has been collected that are stored in the SQLite database. In my case (as shown below) I have readings dating from to 16-Mar-2017 to 08-Oct-2025

Not sure why .net 8 runtime was not part of the package, I will look into this.


MikeWilliams
Newcomer
Forum|alt.badge.img
  • Newcomer
  • October 10, 2025

@Firedog Can you clear the folder C:\ProgramData\OvoData and re-run the program, selecting “All time” so that all records can be retrieved.
That may take some time mine ran from 11:10 to 11:22 to fetch 8 years of data.

Then can you send me by PM

  • the file yyyy-MM-dd* Accounts-Response.json (redacting your account details)
  • the last 100 lines of the log file yyyy-MM-dd.log in the Logs folder
  • a screen shot of the last few files in the dump folder

Feedback