Authorization credentials can be obtained by creating a new app in the Twitter developer platform (https://apps.twitter.com/). Twitter permits downloading 3,200 tweets (https://developer.twitter.com/en/docs/api-reference-index) in the JSON format. The script to download the tweets can be found in CH05 from the book code base. Run the Python script simply by python tweet.py. More instructions on getting access to Twitter credentials can be found on the Twitter developer website: https://developer.twitter.com/en/apply-for-access.
After creating an app on the site, you should be able to get access to keys and tokens similar to the following screenshots: