LinuxCommandLibrary

twurl

OAuth-enabled curl for Twitter API

TLDR

Authorize account

$ twurl authorize --consumer-key [key] --consumer-secret [secret]
copy
GET request
$ twurl [/2/users/me]
copy
POST request
$ twurl -X POST [/2/tweets] -d '{"text":"Hello"}'
copy
List accounts
$ twurl accounts
copy
Set default account
$ twurl set default [username]
copy

SYNOPSIS

twurl [-X method] [-d data] [options] endpoint

DESCRIPTION

twurl is an OAuth-enabled curl replacement specifically designed for the Twitter (X) API. It handles the OAuth authentication handshake automatically, allowing developers to make authenticated API requests without manually managing tokens in each request.
After initial authorization with consumer key and secret, twurl stores credentials and signs all subsequent requests. Multiple accounts can be authorized and switched between, making it easy to test API calls across different users. All Twitter API endpoints are accessible via standard HTTP methods.
Requests support custom headers and JSON request bodies for POST operations. The tool is particularly useful for API exploration and debugging during Twitter application development.

PARAMETERS

-X METHOD

HTTP method.
-d DATA
Request body.
-H HEADER
Custom header.
authorize
Set up OAuth.
accounts
List accounts.

CAVEATS

Twitter API changes. Developer account needed. Ruby required.

HISTORY

twurl was created by Twitter as an OAuth-enabled curl alternative for the Twitter API.

SEE ALSO

curl(1), httpie(1), twitter(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community