-
I am trying to make a test payment through this API however am not able to find a way to get the user_id. How do I find the value for the user_id? Thank you |
Beta Was this translation helpful? Give feedback.
Answered by
mmohades
Mar 21, 2021
Replies: 1 comment 4 replies
-
You can saerch for users or get users by their username, then access the user_id Here is an example: users = client.user.search_for_users(query="Peter")
for user in users:
print(user.id) or you can get a user by their username: user = client.user.get_user_by_username(username="andrew")
print(user.id) Note that the above method may return |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
mmohades
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can saerch for users or get users by their username, then access the user_id
Here is an example:
or you can get a user by their username:
Note that the above method may return
None
if it couldn't find the user with the given username.