venmo icon indicating copy to clipboard operation
venmo copied to clipboard

Access Token Timing out?

Open marshallm94 opened this issue 4 years ago • 4 comments

Have you heard of/had any issues yourself of the access_token in ~/.venmo/credentials timing out?

I'm getting the following error:

pi@raspberrypi:~/Recurring_Venmo $ venmo charge <user_im_trying_to_charge> 1.00 'test'

Traceback (most recent call last):
  File "/home/pi/.local/bin/venmo", line 10, in <module>
    sys.exit(main())
  File "/home/pi/.local/lib/python3.7/site-packages/venmo/cli.py", line 96, in main
    parse_args()
  File "/home/pi/.local/lib/python3.7/site-packages/venmo/cli.py", line 91, in parse_args
    func(**vars(args))
  File "/home/pi/.local/lib/python3.7/site-packages/venmo/payment.py", line 20, in charge
    _pay_or_charge(user, amount, note)
  File "/home/pi/.local/lib/python3.7/site-packages/venmo/payment.py", line 35, in _pay_or_charge
    user_id = venmo.user.id_from_username(username)
  File "/home/pi/.local/lib/python3.7/site-packages/venmo/user.py", line 12, in id_from_username
    for u in search(username):
  File "/home/pi/.local/lib/python3.7/site-packages/venmo/user.py", line 39, in search
    users = response.json()['data']
KeyError: 'data'

However, if I reconfigure from the CL using venmo configure, enter password and code that is texted to me, everything works fine with the same command. Any ideas what's happening?

marshallm94 avatar May 23 '20 22:05 marshallm94

Yes, the credentials expire. You'll need to refresh periodically.

zackhsi avatar May 24 '20 04:05 zackhsi

Is there anyway around this or is it out of your hands (i.e. in Venmo's hands)? I'm trying to have some requests be run periodically without my needing to interact with the software.

Alternatively, do you know how often one has to reconfigure?

marshallm94 avatar May 24 '20 12:05 marshallm94

Not that I'm aware of, sorry.

zackhsi avatar May 25 '20 05:05 zackhsi

Bummer - no worries - great package!

marshallm94 avatar May 27 '20 01:05 marshallm94