MaxApi.Net 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package MaxApi.Net --version 1.0.0
                    
NuGet\Install-Package MaxApi.Net -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MaxApi.Net" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MaxApi.Net" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="MaxApi.Net" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add MaxApi.Net --version 1.0.0
                    
#r "nuget: MaxApi.Net, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package MaxApi.Net@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=MaxApi.Net&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=MaxApi.Net&version=1.0.0
                    
Install as a Cake Tool

MaxApi.Net

What Is It?

MaxApi.Net is an unofficial library for .NET, which provides an API to the new Russian messenger MAX. The API is designed strictly following the official documentation and provides asynchronous methods.

The official documentation is available at the link: click

Before Starting

Before using the API, you need to register with MAX and create a bot via @masterbot to get your own access token, which will be used with each request.

Description

The entry point to the API is the MaxApiProvider class, which requires an access token received from the official bot:

var api = new MaxApiProvider("your_access_token");

The MaxApiProvider functionality is divided into several providers:

  1. Bots - Gets the provider for bot-related operations.
  2. Chats - Gets the provider for chat-related operations.
  3. Subscriptions - Gets the provider for subscription-related operations.
  4. Upload - Gets the provider for file upload operations.

Example

Below is a sample code:

// Returns information about the current bot, which is identified using an access token
var botInfo = await api.Bots.GetBotInfoAsync();

// Returns information about the chat by its ID
var chatInfo = await api.Chats.GetChatAsync(chatId);

// If your bot receives data through a WebHook, this method returns a list of all subscriptions
var subs = await api.Subscriptions.GetSubscriptionsAsync();

// Requests an upload URL for a specific file type
var url = await api.Upload.GetUploadUrlAsync(Entities.UploadType.Image);

Remark

At the moment, creating your own bot and then obtaining an access token is not available in MAX for unknown reasons, so API testing has not been conducted yet! The problem is on their side.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net9.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.1 132 7/9/2025
1.0.0 133 7/7/2025