Skip to content

Instantly share code, notes, and snippets.

@planetscape
planetscape / BookmarkAPI_en.md
Created May 31, 2021 13:47 — forked from stepney141/BookmarkAPI_en.md
WIP: Twitter Undocumented Endpoints for Bookmark

Twitter Undocumented Bookmark API (WIP)

I found out the endpoints for bookmark with Chrome Developer Tools: GET timeline/bookmark, POST bookmark/entries/remove, POST bookmark/entries/remove. The rate limits below are values returned by an official endpoint GET application/rate_limit_status.

This document is still a work in progress because I got stuck in GET timeline/bookmark. Please let me know if you find how to use it.

Notes

  • It is necessary that x-csrf-token in a request header and ct0 in a cookie are the same value. Twitter uses them to avoid CSRF attacks. I recommend that you extract the values from your browsers.
  • All of the endpoints requires OAuth2 Authorizations. Note that they refuse OAuth2 Bearer tokens obtained from POST oauth2/token.
  • You can easily reach the rate limit and get HTTP 429 Error (too many requests), so you should be careful about how many requests you send.
@planetscape
planetscape / save_dataframe.py
Last active March 4, 2021 06:44 — forked from jni/save_dataframe.py
Minimal example attempting to save dataframe from Bokeh selection
# Minimal example attempting to save dataframe from Bokeh selection (Sep 21, 2018)
# https://gist.github.com/jni/73a2a8b6961df6a4b1a63b1e217e66d8
# save_dataframe.py
import pandas as pd
import numpy as np
from bokeh.server.server import Server
from bokeh.application import Application
from bokeh.application.handlers.function import FunctionHandler

Keybase proof

I hereby claim:

  • I am planetscape on github.
  • I am planetscape (https://keybase.io/planetscape) on keybase.
  • I have a public key ASAyKyJ6xKkb7II0_VEMXrh5kBcku9O7fuVg3WaSvaCDlwo

To claim this, I am signing this object: