API Key Setup

Twitter API Key:

  • Go to https://dev.twitter.com/apps/new and log in, if necessary
  • Enter your Application Name, Description and your website address. You can leave the callback URL empty.
  • Accept the TOS, and solve the CAPTCHA.
  • Submit the form by clicking the Create your Twitter Application
  • Copy the consumer key (API key) and consumer secret from the screen into your application

Pastebin.com

In case of pastebin.com it is not neccessary to generate apiKey but you need to whitelist your IP. For this you have to pay and get your IP whitelisted.

Refer https://pastebin.com/doc_scraping_api for detailed information.