Git Product home page Git Product logo

nubank-api's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

nubank-api's Issues

está funcionando generate-certificate.ts ?

Desculpe estou vindo de python não entendo bem node, estou recebendo erros ao tentar executar este código teste ai, gostaria de saber se está funcionando para obter o certificado porque o outro projeto python não está mais conseguindo obter o certificado e isso quebrou minhas pernas desde já agradeço qualquer ajuda.

HTTPS Agent issue on ReactNative

I have implemented in the following way, but I get an error on the api call, the error is that `request('https'') was not defined.
Error:

If you are sure the module exists, try these steps:
 1. Clear watchman watches: watchman watch-del-all
 2. Delete node_modules and run yarn install
 3. Reset Metro's cache: yarn start --reset-cache
 4. Remove the cache: rm -rf /tmp/metro-*
  50 | exports.Http = void 0;
  51 | var axios_1 = require("axios");
> 52 | var https_1 = require("https");
     |                        ^
  53 | var fs_1 = require("fs");
  54 | var constants_1 = require("../constants");
  55 | var Http = /** @class */ (function () {]
import React, { useEffect } from 'react';
import { Container, Text } from './styles';
import Animated from 'react-native-reanimated';
import { NubankApi } from "nubank-api"; 
import uuid from 'react-native-uuid';

export function Settings({ drawerAnimationStyle}: any){
	const CPF: string = "2";
	const PASSWORD: string = "2";
	const AUTH_CODE: string = String(uuid.v4());

      cont api = NubankApi();

	async function Nubank(): Promise<any> {
	 	try {
	 		await NubankApi.auth.authenticateWithQrCode(CPF, PASSWORD, AUTH_CODE);
	 		console.log("You are authenticated!");
	 		console.log(api.authState);				
	 		process.exit(0);
	 	} catch (e) {
	 		console.log(e);
	 	}	
	 }

	return (
		<Animated.View 
			style={{
				flex: 1,
				...drawerAnimationStyle
			}}
		>
			<Container>
				<Text>Comming soon!</Text>
			</Container>
		</Animated.View>
	);
}

nao consigo acessar nenhuma informação sobre a conta, exceto por .me()

não consigo utilizar nenhuma das funções do caminho api.account.
estou tentando gerar cobranças pix, mas eu sempre recebo o erro: TypeError: Cannot read properties of undefined (reading '0')
meu client esta autenticado e todos os outros caminhos funcionam, apenas não consigo acessar os caminhos referentes a account.

Como gerar o qrCode

Olá,

Podem me orientar em como gerar o qr-Code? Não ficou claro pra mim essa etapa.
Eu estou rodando o código, passando no parâmetro o uuid4() .. mas o retorno é 404, então percebei que deve ser um código válido.

obrigado

retorno do feed é undefined

Estava testando a biblioteca e ao tentar utilizar o account.getFeed() está retornando undefined.

Chequei a biblioteca de python para comparar os métodos e notei que falta a propriedade "data" no caminho antes do viewer nesse caso.
Biblioteca em python:
Sem título

Come está:
Sem título (1)

Felizmente a correção é simples e seria apenas adicionar o data no path pata ficar data?.data?.viewer?.savingsAccount?.feed

posso abrir um PR para concertar isso junto com as interfaces.

[Erro] Não consigo usar quase nenhum método da classe Account

Fiz o login, tudo certo.

Crio a classe com :

const api = new NubankApi({
  ...authState
});

e depois puxo os métodos.
Consigo acesso apenas a esses métodos: api.card.getFeed() e api.account.getBills().

Se eu tento o api.account.getInvestments() dá esse erro:

/home/willian/Documents/GitHub/Money7-API-RESTFUL/node_modules/nubank-api/lib/utils/http.js:222
                        throw (_a = error.response.data.errors[0]) !== null && _a !== void 0 ? _a : error;
                                                              ^

TypeError: Cannot read properties of undefined (reading '0')
    at Http.<anonymous> (/home/willian/Documents/GitHub/Money7-API-RESTFUL/node_modules/nubank-api/lib/utils/http.js:222:63)
    at step (/home/willian/Documents/GitHub/Money7-API-RESTFUL/node_modules/nubank-api/lib/utils/http.js:44:23)
    at Object.throw (/home/willian/Documents/GitHub/Money7-API-RESTFUL/node_modules/nubank-api/lib/utils/http.js:25:53)
    at rejected (/home/willian/Documents/GitHub/Money7-API-RESTFUL/node_modules/nubank-api/lib/utils/http.js:17:65)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

[Question] How do you guys managed to find the API endpoints?

I opened this issue because I do not know how we can find the API endpoints without a documentation. I am curious about how you guys made it and maybe I can help building other repositories about other fintech/banks like this one.

And I would really appreciate if you guys give me some resources/directions on how can I discover Nubank or bank related API's their endpoints.

I saw that there are some "Discovery" endpoints, but I did not manage to go beyound that.

Thank you guys!

Erro ao consultar o feed

Ola pessoal,

Estou tento esse erro ao tentar obter o feed, o login e geração de certificado funcionou corretamente.
Alguém sabe o que pode ser?

erro_api

Erro

Depois da última atualização parece que a autenticação parou de funcionar.

Expor função para verificar QRCode autorizado

Olá @fmsouza. Tudo bem?

Eu estava a usar uma versão antiga da lib e ao atualizar para versão mais recente percebi que muita coisa mudou, pra melhor :3.

Na minha aplicação o fluxo que uso para o login é o seguinte:

  • Solicitar CPF/Senha e autenticar
  • Se Incorreto: Informar ao usuário
  • Se correto: Gerar o QRCode e solicitar a leitura
  • A cada segundo verificar se QRCode foi autorizado
  • Se autorizado: Redirecionar o usuário para o app

Mas na versão atual o processo de autenticação e verificação do QRCode se tornaram um único passo. E eu gostaria de manter o processo que uso atualmente (Gosto da ideia de verificar o login antes do QRCode e dar o feedback ao usuário).

Enfim, gostaria de sugerir uma alteração para expor o método de verificação do QRCode assim a lib irá atender ambos os casos. Autenticar em um único passo ou separado, já que o método de somente autenticar já está disponível.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.