eu finalmente consegui criar uma certificado, mas aí quando eu fui ver os saldos da minha conta através do get_account_balance e minhas chaves pix atráves do get_available_pix_keys, acabou dando erro. olhem o erro:
Traceback (most recent call last):
File "C:\Users\arthu\OneDrive\Documentos\Projeto PyNubank\app.py", line 8, in
print(nu.get_available_pix_keys())
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python\Lib\site-packages\pynubank\auth_mode.py", line 23, in wrapper
return function(*args, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python\Lib\site-packages\pynubank\nubank.py", line 296, in get_available_pix_keys
response = self._make_graphql_request('get_pix_keys')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python\Lib\site-packages\pynubank\nubank.py", line 52, in _make_graphql_request
return self._client.post(self._query_url,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python\Lib\site-packages\pynubank\utils\http.py", line 49, in post
return self._handle_response(post(url, json=json, headers=self._headers, self._cert_args))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python\Lib\site-packages\pynubank\utils\http.py", line 35, in _handle_response
raise NuRequestException(response)
pynubank.exception.NuRequestException: The request made failed with HTTP status code 401
e olhem meu código:
from pynubank import Nubank
from variables import cpf, passw
nu = Nubank()
nu.authenticate_with_cert('5**', '1**', 'cert.p12')
print(nu.get_available_pix_keys())
eu não sei porque está dando erro! alguém pode me explicar?
eu finalmente consegui criar uma certificado, mas aí quando eu fui ver os saldos da minha conta através do get_account_balance e minhas chaves pix atráves do get_available_pix_keys, acabou dando erro. olhem o erro: Traceback (most recent call last): File "C:\Users\arthu\OneDrive\Documentos\Projeto PyNubank\app.py", line 8, in
print(nu.get_available_pix_keys())
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python\Lib\site-packages\pynubank\auth_mode.py", line 23, in wrapper
return function(*args, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python\Lib\site-packages\pynubank\nubank.py", line 296, in get_available_pix_keys
response = self._make_graphql_request('get_pix_keys')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python\Lib\site-packages\pynubank\nubank.py", line 52, in _make_graphql_request
return self._client.post(self._query_url,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python\Lib\site-packages\pynubank\utils\http.py", line 49, in post
return self._handle_response(post(url, json=json, headers=self._headers, self._cert_args))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python\Lib\site-packages\pynubank\utils\http.py", line 35, in _handle_response
raise NuRequestException(response)
pynubank.exception.NuRequestException: The request made failed with HTTP status code 401
e olhem meu código:
from pynubank import Nubank
from variables import cpf, passw
nu = Nubank() nu.authenticate_with_cert('5**', '1**', 'cert.p12')
print(nu.get_available_pix_keys())
eu não sei porque está dando erro! alguém pode me explicar?