The pinned Lists endpoints let you look up a user’s pinned Lists and manage which Lists are. Reference for the X API v2 standard tier covering quickstart.
The pinned Lists endpoints let you look up a user’s pinned Lists and manage which Lists are pinned.
# Get pinned Listscurl "https://api.x.com/2/users/2244994945/pinned_lists" \ -H "Authorization: Bearer $USER_ACCESS_TOKEN"
from xdk import Clientclient = Client(bearer_token="YOUR_USER_ACCESS_TOKEN")# Get pinned Listsresponse = client.lists.get_pinned("2244994945")for lst in response.data: print(f"{lst.name}")
import { Client } from "@xdevplatform/xdk";const client = new Client({ accessToken: "YOUR_USER_ACCESS_TOKEN" });// Get pinned Listsconst response = await client.lists.getPinned("2244994945");response.data?.forEach((lst) => { console.log(lst.name);});