NubankClient 0.2.0

Unoficial Nubank Api client for .Net

Install-Package NubankClient -Version 0.2.0
dotnet add package NubankClient --version 0.2.0
<PackageReference Include="NubankClient" Version="0.2.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add NubankClient --version 0.2.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Nubank .Net Client

Unofficial Nubank client for .Net. This project was based in this repo and in this post.

Installation

This package is available through Nuget Packages: https://www.nuget.org/packages/NubankClient

Nuget

Install-Package NubankClient

.NET CLI

dotnet add package NubankClient

Usage

Login (Login is required for any other request)

var nubankClient = new Nubank(login, password);
await nubankClient.Login();

Device Authorization

Login in most part of devices is asking for authorization through QR Code, Nubank Client returns a response that indicate if device authorization is needed when login is requested. See an example:

var nubankClient = new Nubank(login, password);
var loginResponse = await nubankClient.Login();
if (loginResponse.NeedsDeviceAuthorization) {
   var qrcode = loginResponse.GetQrCodeAsAscii();
   // Here you can get qrcode as bitmap too.
   // var qrcode = loginResponse.GetQrCodeAsBitmap();

   // Now the user needs to scan QRCode using your device.
   // The user needs to access nubank in his smartphone and navigate to menu: Nu(Seu Nome) > Perfil > Acesso pelo site.
   // After user scan QRCode:
   await nubankClient.AutenticateWithQrCode(loginResponse.Code);
}

If you need, it is possible to make the process asynchronous like this:

var nubankClient = new Nubank(login, password);
var loginResponse = await nubankClient.Login();
if (loginResponse.NeedsDeviceAuthorization) {
  var qrcode = loginResponse.GetQrCodeAsAscii();

  //Do something with QrCode, save, send, whatever.
}

After user scan QrCode, you can create another NubankClient and you can by pass login.

 var nubankClient = new Nubank(login, password);
 await nubankClient.AutenticateWithQrCode(previousGeneratedCode);
 // Now you can get events

Get Events (Transactions, Bill paid, etc.)

var events = await nubankClient.GetEvents();

Note: The Nubank api returns amount of events without decimal separators, to get a decimal to represent the amount with decimal separators use CurrencyAmount property of Event Class.

Nubank .Net Client

Unofficial Nubank client for .Net. This project was based in this repo and in this post.

Installation

This package is available through Nuget Packages: https://www.nuget.org/packages/NubankClient

Nuget

Install-Package NubankClient

.NET CLI

dotnet add package NubankClient

Usage

Login (Login is required for any other request)

var nubankClient = new Nubank(login, password);
await nubankClient.Login();

Device Authorization

Login in most part of devices is asking for authorization through QR Code, Nubank Client returns a response that indicate if device authorization is needed when login is requested. See an example:

var nubankClient = new Nubank(login, password);
var loginResponse = await nubankClient.Login();
if (loginResponse.NeedsDeviceAuthorization) {
   var qrcode = loginResponse.GetQrCodeAsAscii();
   // Here you can get qrcode as bitmap too.
   // var qrcode = loginResponse.GetQrCodeAsBitmap();

   // Now the user needs to scan QRCode using your device.
   // The user needs to access nubank in his smartphone and navigate to menu: Nu(Seu Nome) > Perfil > Acesso pelo site.
   // After user scan QRCode:
   await nubankClient.AutenticateWithQrCode(loginResponse.Code);
}

If you need, it is possible to make the process asynchronous like this:

var nubankClient = new Nubank(login, password);
var loginResponse = await nubankClient.Login();
if (loginResponse.NeedsDeviceAuthorization) {
  var qrcode = loginResponse.GetQrCodeAsAscii();

  //Do something with QrCode, save, send, whatever.
}

After user scan QrCode, you can create another NubankClient and you can by pass login.

 var nubankClient = new Nubank(login, password);
 await nubankClient.AutenticateWithQrCode(previousGeneratedCode);
 // Now you can get events

Get Events (Transactions, Bill paid, etc.)

var events = await nubankClient.GetEvents();

Note: The Nubank api returns amount of events without decimal separators, to get a decimal to represent the amount with decimal separators use CurrencyAmount property of Event Class.

Release Notes

Implemented QrCode Authentication

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
0.2.0 91 4/19/2019
0.1.2 76 3/9/2019
0.1.1 79 3/3/2019
0.1.0 90 2/23/2019