Optional
init: RequestInitOptional
init: RequestInitInstalls the authentication information into a headers-like object. If needed, the authentication token will be updated from the API automatically.
A Headers instance representing a request's headers.
Logs into a Twitter account.
The username to log in with.
The password to log in with.
Optional
email: stringThe email to log in with, if you have email confirmation enabled.
Optional
twoFactorSecret: stringThe secret to generate two factor authentication tokens with, if you have two factor authentication enabled.
MDN Reference