Skip to content

Instantly share code, notes, and snippets.

@cmj
Last active June 18, 2024 12:32
Show Gist options
  • Save cmj/6e62a7e5ee5b90212e6ea6e7616ac970 to your computer and use it in GitHub Desktop.
Save cmj/6e62a7e5ee5b90212e6ea6e7616ac970 to your computer and use it in GitHub Desktop.
Twitter v1.1 timeline API
$ curl -s "https://api.twitter.com/1.1/timeline/user.json?id=11348282&count=1" -H "Authorization: Bearer AAAAAAAAAAAAAAAAAAAAAFQODgEAAAAAVHTp76lzh3rFzcHbmHVvQxYYpTw%3DckAlMINMjmCwxUcaXbAN4XqJVdgMJaHqNOFgPMK0zN1qLqLQCF" | jq
{
  "twitter_objects": {
    "tweets": {
      "1802366777575297109": {
        "created_at": "Sun Jun 16 15:45:00 +0000 2024",
        "id": 1802366777575297109,
        "id_str": "1802366777575297109",
        "text": "Happy #FathersDay! This image was taken by our Galileo spacecraft, named for a father of modern astronomy, Galileo… https://t.co/VG0yP7Nhk1",
        "truncated": true,
        "entities": {
          "hashtags": [
            {
              "text": "FathersDay",
              "indices": [
                6,
                17
              ]
            }
          ],
          "symbols": [],
          "user_mentions": [],
          "urls": [
            {
              "url": "https://t.co/VG0yP7Nhk1",
              "expanded_url": "https://twitter.com/i/web/status/1802366777575297109",
              "display_url": "twitter.com/i/web/status/1…",
              "indices": [
                116,
                139
              ]
            }
          ]
        },
        "source": "<a href=\"https://www.sprinklr.com\" rel=\"nofollow\">Sprinklr</a>",
        "in_reply_to_status_id": null,
        "in_reply_to_status_id_str": null,
        "in_reply_to_user_id": null,
        "in_reply_to_user_id_str": null,
        "in_reply_to_screen_name": null,
        "user": {
          "id": 11348282,
          "id_str": "11348282",
          "has_no_screen_name": false,
          "require_some_consent": false
        },
        "geo": null,
        "coordinates": null,
        "place": null,
        "contributors": null,
        "is_quote_status": false,
        "retweet_count": 436,
        "favorite_count": 2566,
        "conversation_id": 1802366777575297109,
        "conversation_id_str": "1802366777575297109",
        "favorited": false,
        "retweeted": false,
        "possibly_sensitive": false,
        "possibly_sensitive_appealable": false,
        "possibly_sensitive_editable": true,
        "lang": "en",
        "supplemental_language": null
      }
    },
    "users": {
      "11348282": {
        "id": 11348282,
        "id_str": "11348282",
        "counts": {
          "saved_searches": 0,
          "lists": {
            "subscribed": 2,
            "owned": 23
          }
        },
        "name": "NASA",
        "screen_name": "NASA",
        "location": "Pale Blue Dot",
        "description": "There's space for everybody. ✨\n\nVerification: https://t.co/8nok3NP4PW",
        "url": "https://t.co/9NkQJKAnuU",
        "entities": {
          "url": {
            "urls": [
              {
                "url": "https://t.co/9NkQJKAnuU",
                "expanded_url": "http://www.nasa.gov/",
                "display_url": "nasa.gov",
                "indices": [
                  0,
                  23
                ]
              }
            ]
          },
          "description": {
            "urls": [
              {
                "url": "https://t.co/8nok3NP4PW",
                "expanded_url": "http://nasa.gov/socialmedia",
                "display_url": "nasa.gov/socialmedia",
                "indices": [
                  46,
                  69
                ]
              }
            ]
          }
        },
        "protected": false,
        "followers_count": 80953750,
        "friends_count": 175,
        "listed_count": 100213,
        "created_at": "Wed Dec 19 20:20:32 +0000 2007",
        "favourites_count": 16350,
        "utc_offset": null,
        "time_zone": null,
        "geo_enabled": false,
        "verified": false,
        "statuses_count": 71976,
        "lang": null,
        "contributors_enabled": false,
        "is_translator": false,
        "is_translation_enabled": false,
        "profile_background_color": "000000",
        "profile_background_image_url": "http://abs.twimg.com/images/themes/theme1/bg.png",
        "profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme1/bg.png",
        "profile_background_tile": false,
        "profile_image_url": "http://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB_normal.jpg",
        "profile_image_url_https": "https://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB_normal.jpg",
        "profile_banner_url": "https://pbs.twimg.com/profile_banners/11348282/1718393721",
        "profile_link_color": "205BA7",
        "profile_sidebar_border_color": "000000",
        "profile_sidebar_fill_color": "F3F2F2",
        "profile_text_color": "000000",
        "profile_use_background_image": true,
        "has_extended_profile": true,
        "default_profile": false,
        "default_profile_image": false,
        "following": null,
        "follow_request_sent": null,
        "notifications": null,
        "business_profile_state": "none",
        "translator_type": "regular",
        "withheld_in_countries": [],
        "has_no_screen_name": false
      }
    },
    "custom_timelines": {},
    "moments": {}
  },
  "response": {
    "timeline": [
      {
        "entity_id": {
          "type": "tweet",
          "ids": [
            "1802366777575297109"
          ]
        },
        "sort_index": "1802366777575297109",
        "tweet": {
          "id": "1802366777575297109"
        }
      }
    ],
    "cursor": {
      "top": "1802366777575297109",
      "bottom": "1802366777575297109",
      "gaps": [
        "bottom"
      ]
    }
  }
}
@cmj
Copy link
Author

cmj commented Jun 18, 2024

-               "code": 200,
-               "message": "OK",
+               "code": 34,
+               "message": "Sorry, that page does not exist",
                "rate_limit": 300,
                "rate_limit_reset": 900,
-               "status": "✅",
+               "status": "❌",
                "url": "https://api.twitter.com/1.1/timeline/user.json?id=783214&include_profile_interstitial_type=1&include_blocking=1&include_blocked_by=1&include_followed_by=1&include_want_retweets=1&include_mute_edge=1&include_can_dm=1&include_can_media_tag=1&skip_status=1&cards_platform=Web-13&include_cards=1&include_composer_source=true&include_ext_alt_text=true&include_reply_count=1&tweet_mode=extended&include_entities=true&include_user_entities=true&include_ext_media_color=true&include_ext_media_availability=true&send_error_codes=true&simple_quoted_tweets=true&ext=mediaStats%2ChighlightedLabel%2ChasNftAvatar%2CvoiceInfo%2CbirdwatchPivot%2Cenrichments%2CsuperFollowMetadata%2CunmentionInfo%2CeditControl%2Cvibe&count=40",

BANKA2017/twitter-monitor-assets@4ef590c#diff-810c957819b0bd18f8b8fd9b7e919598c1902a86447bfff2a23d6d4a9412039cL845-R845

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment