resolve_x_list_id_by_name

Documentation for eth_defi.feed.twitter_api.resolve_x_list_id_by_name function.

resolve_x_list_id_by_name(list_name, consumer_key, consumer_secret, access_token, access_token_secret)

Resolve an X list ID by exact list name for the authenticated user.

Uses OAuth 1.0a user context to read the current X user and enumerate the lists owned by that account. This is intended for operator scripts where the production list owner is also the OAuth user.

Parameters
  • list_name (str) – Exact X list name to find, e.g. Best builders in DeFi.

  • consumer_key (str) – OAuth 1.0a consumer key.

  • consumer_secret (str) – OAuth 1.0a consumer secret.

  • access_token (str) – OAuth 1.0a user access token.

  • access_token_secret (str) – OAuth 1.0a user access token secret.

Returns

Numeric X list ID as a string.

Raises

XApiError – If the current user cannot be read, or if zero or multiple owned lists match the requested name.

Return type

str

See the X API v2 list lookup endpoints: https://docs.x.com/x-api/lists/list-lookup