Dot0.Jibit 10.0.1

dotnet add package Dot0.Jibit --version 10.0.1
                    
NuGet\Install-Package Dot0.Jibit -Version 10.0.1
                    
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="Dot0.Jibit" Version="10.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Dot0.Jibit" Version="10.0.1" />
                    
Directory.Packages.props
<PackageReference Include="Dot0.Jibit" />
                    
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 Dot0.Jibit --version 10.0.1
                    
#r "nuget: Dot0.Jibit, 10.0.1"
                    
#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 Dot0.Jibit@10.0.1
                    
#: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=Dot0.Jibit&version=10.0.1
                    
Install as a Cake Addin
#tool nuget:?package=Dot0.Jibit&version=10.0.1
                    
Install as a Cake Tool

Dot0.Jibit

Identity lookup by national code and Persian birth date is available through:

var identity = await jibit.GetIdentityAsync("0123456789", "13700101", completeInfo: true);
Console.WriteLine(identity.IdentityInfo?.FirstName);

completeInfo defaults to false. Accounts configured for complete identity records always receive them. Fields omitted from partial records remain null. Authentication and request tracking use the client defaults. To run the identity live test, set JIBIT_NATIONAL_CODE, JIBIT_BIRTH_DATE (Persian yyyyMMdd), and optionally JIBIT_COMPLETE_INFO=true, then run:

dotnet test Test/Test.csproj --filter 'FullyQualifiedName=Dot0.Test.Jibit.JibitIdeTest.GetIdentity' --logger 'console;verbosity=detailed'

HTTP client for Jibit's Identicator (استعلام) API, based on the supplied Persian technical document v1.5.2. The inquiry API lives in the Ide folder and Dot0.Jibit.Ide namespace. All response and nested model types use the Jibit prefix. The default API base address is https://napi.jibit.ir/ide/.

using Dot0.Jibit.Ide;

// Reuse HttpClient and JibitClient in your application.
using var http = new HttpClient();
var jibit = new JibitClient(http, apiKey, secretKey);

var result = await jibit.MatchMobileToNationalCodeAsync("0123456789", "09123456789");
Console.WriteLine(result.Matched);

var card = await jibit.GetCardAsync("1234123412341234");
Console.WriteLine(card.CardInfo?.OwnerName);

Authentication is automatic. The client renews access tokens on the next request once 25 minutes have elapsed. Refresh tokens are cached for 48 hours with a one-minute safety margin. Token acquisition is serialized for concurrent calls. GenerateTokenAsync and RefreshTokenAsync are also available explicitly. The caller owns the supplied HttpClient; its timeout and handler configuration are respected. Cancellation tokens are supported. An optional HTTPS base address can override the default.

Saved tokens can be supplied when creating a client:

var jibit = new JibitIdeClient(http, apiKey, secretKey,
    accessToken: savedAccessToken,
    accessTokenExpireDate: savedAccessExpiryUtc,
    refreshToken: savedRefreshToken,
    refreshTokenExpireDate: savedRefreshExpiryUtc);

// Read these after an inquiry or explicit token generation/refresh to persist the current values.
var accessToken = jibit.AccessToken;
var accessExpiryUtc = jibit.AccessTokenExpireDate;
var refreshToken = jibit.RefreshToken;
var refreshExpiryUtc = jibit.RefreshTokenExpireDate;

All four constructor parameters are optional and nullable. Expiry parameters and properties use DateTime?; returned dates always have Kind = DateTimeKind.Utc. Local inputs are converted to UTC, and unspecified inputs are treated as UTC. Token and expiry properties are null when the corresponding token is unavailable. Omitted expiries use the cache durations above, starting at client creation. Expired saved access tokens are refreshed if the saved refresh token is still valid; otherwise a new pair is generated.

The client supports card/IBAN inquiries, card-to-account and card/account-to-IBAN conversion, card-to-IBAN availability, ownership matching by national code or name, Shahkar, postal address and coordinates, identity similarity, foreigner and corporation identity, military qualification, Sana registration, balances, and daily usage reports. Responses are typed and retain unknown JSON fields in AdditionalData. Identifiers stay strings to preserve leading zeros. Birth dates use the Persian calendar in yyyyMMdd; daily report dates use Persian yyMMdd (for example 000708). Bank identifiers use the uppercase names from Jibit's bank table, such as MELLI or MELLAT. Identity similarity needs at least one name.

Unsuccessful responses throw JibitException, exposing StatusCode, Code, Message, ResponseBody, and TrackId for support. Each request has an X-TRACK-ID. The client does not retry failed inquiries automatically. A forbidden response can indicate invalid authentication or an inactive account; inspect the response and account configuration before explicitly generating a new token.

Run the tests

From the repository root, run the offline tests:

dotnet test Test/Test.csproj --filter FullyQualifiedName~JibitClientTests

For real API calls, set credentials in the shell where you run tests:

$env:JIBIT_API_KEY = '<your API key>'
$env:JIBIT_SECRET_KEY = '<your secret key>'
dotnet test Test/Test.csproj --filter 'FullyQualifiedName~JibitLiveTests.GenerateToken' --logger 'console;verbosity=detailed'

Set the inputs for the inquiry you want to exercise, then select its test:

$env:JIBIT_NATIONAL_CODE = '<10-digit national code>'
$env:JIBIT_MOBILE_NUMBER = '<mobile number>'
dotnet test Test/Test.csproj --filter 'FullyQualifiedName~JibitLiveTests.Shahkar' --logger 'console;verbosity=detailed'
Test Additional environment variables
GenerateToken, RefreshToken, Balances None
CardInquiry, CardToIban JIBIT_CARD_NUMBER
IbanInquiry JIBIT_IBAN
Shahkar JIBIT_NATIONAL_CODE, JIBIT_MOBILE_NUMBER
PostalAddress JIBIT_POSTAL_CODE

Missing inputs mark live tests inconclusive/skipped. To run all configured live tests, use --filter TestCategory=JibitLive. Successful inquiries may incur Jibit charges. Your account must have the requested service enabled and your outgoing IP must be allowlisted by Jibit. Results are printed to test output, including inquiry data; token values are omitted. A matching result of false is a valid API response.

The Test project excludes the old BaleBotTest.cs and TelegramBotTest.cs samples because they reference the removed Dot0.TelegramMvc API. Their source files are preserved.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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.
  • net10.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
10.0.1 38 10/13/2026