Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
rettiwt-auth
Advanced tools
A CLI tool for authenticating against Twitter API
The package is intended to be installed globally.
npm install -g rettiwt-auth
yarn global add rettiwt-auth
The following are the two types of authentcation methods available, with each method providing access to different set of resources:
The following examples demonstrate authenticating against Twitter API and generating the credentials.
Install the package globally by following the steps in the 'Installation' section.
Open a commandline/shell and use the command:
rettiwt-auth generate -o api_key.txt <email> <username> <password>
Where,
The '-o' option specifies the CLI to save the output API key to a new text file called 'api_key.txt'.
If you do not specify the '-o' option, the API key is output to console instead.
Store the generated API key in a safe spot for later use.
Install the package globally by following the steps in the 'Installation' section.
Open a commandline/shell and use the command:
rettiwt-auth generate -h -o auth_headers.json <email> <username> <password>
Where,
The '-h' option specifies the CLI to generate the credentials as HTTP headers.
The '-o' option specifies the CLI to save the output HTTP headers to a new JSON file called 'auth_headers.json'.
If you do not specify the '-o' option, the HTTP headers are output to console instead.
Store the generated API key in a safe spot for later use.
For authenticating the requests to Twitter, append the headers to outgoing HTTP requests.
To get a list of all commands available, use the command:
rettiwt-auth help
To check the description of single command, use the command:
rettiwt-auth help <command_name>
Where,
When you generate the credentials as API key/HTTP headers,
The generated API key/HTTP headers are valid for a duration of 1 year, starting from the day of generation.
As such, it is suggested to generated the API key/HTTP headers once, then store them in a safe place (such as in an environment variable or a JSON file).
Notes:
Whenever it is required to authenticate against Twitter API, use the stored API key/HTTP headers.
The complete API reference can be found this page
FAQs
A CLI tool for authenticating against Twitter API
We found that rettiwt-auth demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.