Skip to content

Receive live stream events (comments, gifts, etc.) in realtime from Instagram LIVE.

Notifications You must be signed in to change notification settings

jwdeveloper/InstagramLive

Repository files navigation

Instagram Live

❤️❤️🎁 Connect to Instagram live in 3 lines 🎁❤️❤️

Introduction

A C# library dedicated for connecting to Instagram live.

Join the support discord and visit the #instagram-support channel for questions, contributions and ideas. Feel free to make pull requests with missing/new features, fixes, etc

NOTE: This is not an official API. It's a reverse engineering project.

Getting started

  1. Install the package
<PackageReference Include="InstaLiveDotNet" Version="1.0.0" />


  1. Create your first chat connection
var client = InstagramLive
    .NewClient()
    .Configure(properties =>
    {
        //User credentials to login
        properties.UserName = "username";
        properties.Password = "********";

        //Or sessionId + deviceId
        properties.SessionId = "session id";
        properties.DeviceId = "device id    ";
    })
    .OnError((live, @event) =>
    {
        Console.WriteLine($"we have error { @event.Exception.Message}");
    })
    .OnConnected((live, @event) =>
    {
        Console.WriteLine("Connected to live");
    })
    .OnDisconnected((liveClient, data) =>
    {
        Console.WriteLine("OnDisconnected to live");
    })
    .OnJoin((liveClient, data) =>
    {
        Console.WriteLine("User joined to live "+data.ToJson());
    })
    .OnComment((live, @event) =>
    {
        Console.WriteLine("Comment "+@event.ToJson());
    })
    .OnSystemComment((liveClient,  @event) =>
    {
        Console.WriteLine("System Comment "+@event.ToJson());
    })
    .Build();




await client.Connect("jacolwol");

Contributing

Library documentation for contributors

Your improvements are welcome! Feel free to open an issue or pull request.

About

Receive live stream events (comments, gifts, etc.) in realtime from Instagram LIVE.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages