-
Notifications
You must be signed in to change notification settings - Fork 175
Closed
Labels
Description
Clonei o repo do zero e gerei o certificado rodando o comando pynubank no terminal.
Escrevi esse arquivo:
from pynubank import Nubank
nu = Nubank()
nu.authenticate_with_cert('[FILTERED]', '[FILTERED]', 'cert.p12')
print(nu.get_account_balance())E estou recebendo esse erro:
Traceback (most recent call last):
File "[FILTERED]/pynubank-test/test.py", line 7, in <module>
print(nu.get_account_balance())
^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/pynubank/auth_mode.py", line 23, in wrapper
return function(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/pynubank/nubank.py", line 235, in get_account_balance
data = self._make_graphql_request('account_balance')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/pynubank/nubank.py", line 52, in _make_graphql_request
return self._client.post(self._query_url,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/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 "/opt/homebrew/lib/python3.11/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
tavlima, bartier, hugobarauna, fegvilela, lucasdavid and 7 more