twitter-api-client icon indicating copy to clipboard operation
twitter-api-client copied to clipboard

Question: How to get the user id from username?

Open molinto opened this issue 9 months ago • 0 comments

Hi, thanks for all your hard work on this project folks.

I'm trying to block a list of users, but I need the userid (https://github.com/trevorhobenshield/twitter-api-client/blob/main/twitter/account.py#L367), but I only have Twitter usernames.

The official docs, can take screen_name as a param (https://developer.twitter.com/en/docs/twitter-api/v1/accounts-and-users/mute-block-report-users/api-reference/post-blocks-create).

So question is, how to get the user id from username please?

molinto avatar May 15 '24 08:05 molinto