A .NET library (netstandard2.1) for accessing local Blink camera storage: fetching the list of clips, downloading and deleting videos. Works on runtimes that support .NET Standard 2.1 (for example .NET 6/7/8/9, .NET Core 3.0+).
- Login/password authorization and PIN confirmation (2FA).
- Fetching dashboard data and the list of Sync Modules.
- Getting the list of clips from a module's local storage.
- Download a clip as a byte array.
- Delete a clip from the device.
- Configurable delay between requests to stabilize the API.
Via .NET CLI:
dotnet add package Blink.NET
Via PackageReference:
<ItemGroup>
<PackageReference Include="Blink.NET" Version="x.y.z" />
<!-- see the latest version on https://www.nuget.org/packages/Blink.NET/ -->
</ItemGroup>
Simple scenario: authorize, confirm PIN (if required), download clips from a single Sync Module.
using Blink;
var client = new BlinkClient();
// Authorization (reauth:true emulates Blink app behavior)
var auth = await client.AuthorizeAsync(email: "you@example.com", password: "YourPassword", reauth: true);
// If the server requires client verification — enter PIN from SMS and confirm
if (auth.Account.IsClientVerificationRequired)
{
Console.Write("Enter PIN: ");
var code = Console.ReadLine();
await client.VerifyPinAsync(code);
}
// Get clips from a single Sync Module (throws if there are multiple modules)
var videos = await client.GetVideosFromSingleModuleAsync();
// Download the first clip as bytes
var first = videos.First();
byte[] bytes = await client.GetVideoBytesAsync(first);
File.WriteAllBytes($"{first.Id}.mp4", bytes);
- Authorization and, if necessary, PIN confirmation:
var auth = await client.AuthorizeAsync(email, password, reauth: true);
if (auth.Account.IsClientVerificationRequired)
{
await client.VerifyPinAsync(pinFromSms);
}
- Get Sync Modules and clips:
var dashboard = await client.GetDashboardAsync();
var module = dashboard.SyncModules.Single(); // choose the desired module
var videos = await client.GetVideosFromModuleAsync(module);
- Download a clip and (optionally) delete it:
var data = await client.GetVideoBytesAsync(video);
await File.WriteAllBytesAsync($"{video.Id}.mp4", data);
// if needed — delete the clip from the device
// await client.DeleteVideoAsync(video);
-
GeneralSleepTime (int, default 3500 ms) Small delay between requests. Without it the server may sometimes return an empty response. You can reduce or disable it if your environment is stable.
-
UniqueId (string) A unique identifier for the device/client that helps avoid repeated PIN verification. By default generated as a Guid.
Note: If you don't set this property, a new GUID will be generated each time you create a BlinkClient instance. This may lead to frequent requests for PIN verification, as the server treats each new GUID as a new device. To minimize the need for repeated PIN confirmations, it's recommended to set UniqueId to a consistent value (like a fixed GUID or a hash of your email) that remains the same across sessions.
- Task AuthorizeAsync(string email, string password, bool reauth = true)
- Task VerifyPinAsync(string code)
- Task GetDashboardAsync()
- Task<IEnumerable> GetVideosFromModuleAsync(SyncModule module)
- Task<IEnumerable> GetVideosFromSingleModuleAsync()
- Task<byte[]> GetVideoBytesAsync(BlinkVideoInfo video, int tryCount = 3)
- Task DeleteVideoAsync(BlinkVideoInfo video)
See models and exceptions in Sources/Blink/Models
and Sources/Blink/Exceptions
.
There is a small example in Sources/Blink.ConsoleTest
:
- Create a
secrets.json
file next toProgram.cs
with your login/password:
{
"email": "you@example.com",
"password": "YourPassword"
}
- Build and run:
cd Sources/Blink.ConsoleTest
dotnet build
dotnet run
- A Blink account and at least one Sync Module with local storage are required.
- Client verification (PIN via SMS) is often enabled. This is normal behavior.
- The Blink API can be unstable without pauses between requests — use
GeneralSleepTime
.
- Do not store login/password in the repository. Use user secrets, environment variables, or encrypted stores.
- Remove tokens and personal data from logs before publishing.
dotnet build Sources/Blink/Blink.csproj
This project is not affiliated with Blink, Amazon, or any other companies. Use at your own risk and in accordance with Blink's terms of service.
MIT — see LICENSE.md.