Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

request_money() 400 Bad Request Error 'User ID was not provided' #52

Closed
bji219 opened this issue Jun 22, 2021 · 1 comment
Closed

request_money() 400 Bad Request Error 'User ID was not provided' #52

bji219 opened this issue Jun 22, 2021 · 1 comment

Comments

@bji219
Copy link

bji219 commented Jun 22, 2021

Hi, cool API- I am having some trouble with the send and request_money() functions. I am inputing the requests as follows:

access_token = Client.get_access_token(username='my_username',
                                           password='my_password', device_id="blah")

venmo = Client(access_token=access_token)

venmo.payment.request_money(1.00, "message", "username")

However, I am getting the 404 error saying that the user ID was not provided. I checked and the ID is a valid Venmo username (like @username, where "username" would be input above).

The error:

 File "/Users/blahblahpath/python3.8/site-packages/venmo_api/utils/api_client.py", line 170, in __validate_response
    raise HttpCodeError(response=response)
venmo_api.models.exception.HttpCodeError: HTTP Status code is invalid. Could not make the request because -> 400 Bad Request.
Error: {'error': {'message': 'User ID was not provided. ', 'code': 1129, 'links': None, 'title': 'Error'}}

Please let me know if there is something I am missing here! Thanks again for sharing!

@bji219
Copy link
Author

bji219 commented Jun 22, 2021

Never mind, I used the user.id function that was mentioned in a previous comment to get the numeric id instead of the text. Using the numeric ID rather than the user handle works. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant