Skip to content

Instantly share code, notes, and snippets.

@phonedude
Last active December 12, 2022 20:41
Show Gist options
  • Save phonedude/ff2c006022325691f0e9f5e8446118c8 to your computer and use it in GitHub Desktop.
Save phonedude/ff2c006022325691f0e9f5e8446118c8 to your computer and use it in GitHub Desktop.
"Copy as curl" from browser, but since the Twitter DM session is over, the server returns a 401 instead of a 200.
% curl -i 'https://ton.twitter.com/i/ton/data/dm/1600870219324465156/1600870190459256832/KM0EBzij.jpg:small' \
-X 'GET' \
-H 'Cookie: _ga=GA1.2.1578974351.1658522778; _gid=GA1.2.1415303809.1669565137; twid=u%3D1600710747004305409; att=1-n11EVoxa8oM767165HUbjPZ8YJFiYvFZMzw3uCFr; auth_token=88ba7e40f9067e
ec06c5501f86da52c9658dbf3b; ct0=43a7ed19a7f2dd7d0f8cf464bb9ac2b31fcacf0288a38c2c8a0773a2327a4f7d82b02030b5255758b42c5cd26ff817784a488a3fbd108dff3963f4ba66b3a1d46cd2ac8031028e57f6a3bd
25253aae40; kdt=1pjaQNrUHWOACrgtiPbMODtq9EtyfO2zjyqIRn2M; _twitter_sess=BAh7CSIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNo%250ASGFzaHsABjoKQHVzZWR7ADoPY3JlYXRlZF9hdGwrCEj9I
POEAToMY3NyZl9p%250AZCIlZWQ5OGM3NWE3NjliNWM5YTExYTAyODEwZjEzMzE2ZmQ6B2lkIiUxOGI2%250AZjk4Y2Q2NTlmMjI1YWQxNDAxZTEyNjhhNjI5NA%253D%253D--8432d160885b961f50dd7ad4bfac669c10cd8f1b; gt=16
00929594542067725; dnt=1; guest_id=v1%3A167052633266899352; personalization_id="v1_I8bVcj9tTkUu6IElXKvpxA=="; guest_id_ads=v1%3A157695208658630181; guest_id_marketing=v1%3A1576952086
58630181; remember_checked_on=1' \
-H 'Accept: image/webp,image/png,image/svg+xml,image/*;q=0.8,video/*;q=0.8,*/*;q=0.5' \
-H 'Host: ton.twitter.com' \
-H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.3 Safari/605.1.15' \
-H 'Accept-Language: en-us' \
-H 'Referer: https://twitter.com/' \
-H 'Connection: keep-alive'
HTTP/2 401
date: Thu, 08 Dec 2022 19:20:26 UTC
perf: 7626143928
server: tsa_b
cache-control: no-cache
content-length: 0
x-transaction-id: b7637e1d0cca1353
timing-allow-origin: https://twitter.com, https://mobile.twitter.com
x-content-type-options: nosniff
strict-transport-security: max-age=631138519
x-response-time: 5
x-connection-hash: 5161af05a9e051d7c2df362290b685cdbe9c1722ef4c0b836b96a54070d4fa0f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment