This library for C# compiled against .NET 6 will allow you to easily communicate with the Ring API and retrieve details about your Ring doorbells and Ring chimes.
If you're just looking for a tool to download your Ring recordings, go here instead.
If you're looking for a tool to download snapshots from your Ring cameras, go here.
0.5.4.0 - released April 5, 2024
0.5.3.0 - released September 2, 2023
0.5.2.0 - released July 4, 2023
0.5.1.0 - released July 3, 2023
0.5.0.1 - released September 14, 2022
0.5.0.0 - released September 14, 2022
0.4.4.0 - released September 14, 2022
0.4.3.2 - released April 29, 2020
GetDoorbotsHistory
throwing a NullReferenceException when the Ring API would return an empty result0.4.3.1 - released March 18, 2020
DeviceUnknownException
to be thrown when using GetDoorbotsHistory
requesting information for a specific Ring device which does not exist0.4.3.0 - released March 18, 2020
GetDoorbotsHistory
method which allows providing a specific doorbot id to retrieve only the items for that specific doorbot0.4.2.2 - released March 16, 2020
0.4.2.1 - released January 22, 2020
session.GetDoorbotsHistory(startDate, endDate)
could end up in an endless loop0.4.2.0 - released January 2, 2020
GetLatestSnapshot
to retrieve a snapshot from a doorbotUpdateSnapshot
to force refreshing a snapshot from a doorbotGetDoorbotSnapshotTimestamp
to retrieve the date and time at which the last snapshot was taken from a doorbot0.4.1.0 - released December 24, 2019
session.ShareRecording()
to share a recording and get returned the unique URL from which it can be downloaded by anyone if in their posession0.4.0.3 - released December 24, 2019
0.4.0.2 - released December 24, 2019
0.4.0.1 - released December 24, 2019
0.4.0.0 - released December 23, 2019
session.Authenticate()
first. Then once you have received the token, call session.Authenticate(twoFactorAuthCode: "12345")
where you replace 12345 with the token you received. Once this returns the access token, you can use this access token to access the Ring API without any further multi factor authentication requirements anymore.0.3.5.0 - released October 27, 2019
public async Task RefreshSession()
which will try to renew the session based on the refresh token in the sessionpublic async Task EnsureSessionValid()
which validates if the current session is still valid and renews it if it isn't anymore. This method is called inside every method that retrieves data from the Ring service so you should not have to call this method yourself.0.3.4.0 - released October 4, 2019
public async Task<List<Entities.DoorbotHistoryEvent>> GetDoorbotsHistory(DateTime startDate, DateTime? endDate)
which allows for retrieving historical items between a specific date/time span. Note though that since the Ring API does not expose this functionality, it relies on retrieving historical items in batches until it has found all that fit within the date/time span, so it's not super efficient, but it works.'0.3.3.0 - released October 4, 2019
0.3.2.0 - released August 9, 2019
0.3.1.0 - released August 9, 2019
0.3.0.1 - released March 2, 2019
0.3.0.0 - released March 2, 2019
0.2.2.1 - released September 13, 2018
0.2.2 - released July 2, 2018
Api.Session.GetSessionByRefreshToken(string refreshToken)
method to support using OAuth Refresh Tokens for getting an Access Token.Api.Exceptions.ThrottlingException
to notify you if the request has failed due too throttling. Just try it again in a few minutes and it typically works again. Check the InnerException
of it for the glory details on why it failed.OAuthToken
on the Api.Session
class which gives you access to the full OAuth Token retrieved during authentication against the Ring API.0.2.1 - released June 28, 2018
0.2 - released August 18, 2017
0.1 - released August 13, 2017
This API is built using Microsoft .NET Standard 2.0 and is fully asynchronous
To communicate with the Ring API, add the NuGet package to your solution and add a using reference in your code:
using KoenZomers.Ring.Api;
Then create a new session instance using:
var session = new Session("your@email.com", "yourpassword");
Note that this line does not perform any communications with the Ring API yet. You need to manually trigger authenticate before you can start using the session:
await session.Authenticate();
If the Ring account you're connecting with has been set up with a two factor authentication requirement, wait for the text message or e-mail from Ring with the code to arrive and run Authenticate again providing this code:
await session.Authenticate(twoFactorAuthCode: "12345");
If the account does not require two factor authentication, you can skip this step.
Once this succeeds, you can call one of the methods on the session instance to retrieve data, i.e.:
To retrieve all Ring devices connected to your account to i.e. retrieve the device Id needed for some methods:
var devices = await session.GetRingDevices();
To retrieve all recorded doorbell events including the recording Ids which you will need for the next two samples:
var doorbotHistory = await session.GetDoorbotsHistory();
To save a recording directly to your disk (use GetDoorbotsHistory to get the Id):
await session.GetDoorbotHistoryRecording("6000000004618901011", "c:\\temp\\recording.mp4");
To share a recording (use GetDoorbotsHistory to get the Id):
await session.ShareRecording("6000000004618901011");
To retrieve the latest available snapshot from a doorbot and save it to disk (use GetRingDevices to get the Id):
await session.GetLatestSnapshot(1111111, "c:\\temp\\snapshot.jpg");
To force a new snapshot to be taken from a doorbot (use GetRingDevices to get the Id):
await session.UpdateSnapshot(1111111);
To retrieve the date and time at which the last snapshot was taken from a doorbot (use GetRingDevices to get the Id):
var timestamps = await session.GetDoorbotSnapshotTimestamp(1111111);
Check out the UnitTest project in this solution for full insight in the possibilities and working code samples. If you want to run the Unit Tests, just copy the App.sample.config file in the UnitTest project to App.config and fill in your Ring username and password and you're good to go to run all tests. They will not make any changes to your Ring devices or Ring profile, just retrieve information, so you can run it without any risk. If you're using text message or e-mail message two factor authentication on the Ring account you want to perform the unit tests with, just leave TwoFactorAuthenticationToken
empty in the config file, run the unit tests, wait for the text or e-mail message to arrive, enter the code from the text or e-mail message in the TwoFactorAuthenticationToken
appSetting in the config file and run the unit tests again. It should now succeed and update the RingRefreshToken
appSetting with a valid refresh token it can use on subsequent runs so it no longer needs credentials or two factor authentication to run the unit tests.
You can also pull this API in as a NuGet package by adding "KoenZomers.Ring.Api" or running:
Install-Package KoenZomers.Ring.Api
Package statistics: https://www.nuget.org/packages/KoenZomers.Ring.Api
With this API at its current state you can:
Any kind of feedback is welcome! Feel free to drop me an e-mail at koen@zomers.eu or create an issue