code: def authorize(self, consumer_key, consumer_secret, callback_url=None,
                    access_token=None, access_token_secret=None):
          
          self.consumer_key = consumer_key
          self.consumer_secret = consumer_secret
  
          if not access_token and not access_token_secret:
              if not callback_url:
                  return (False, "Callback URL required")
              oauth = OAuth1(
                  consumer_key,
                  client_secret=consumer_secret,
                  callback_uri=callback_url)
              r = requests.post(self.url('REQUEST_TOKEN'), auth=oauth)
              if r.status_code == 200:
                  creds = parse_qs(r.content)
  
                  self.access_token = creds.get('oauth_token')[0]
                  self.access_token_secret = creds.get('oauth_token_secret')[0]
              else:
                  return (False, r.content)
          else:
              self.finalize_oauth(access_token, access_token_secret)
  
          return (True, None)
docs: Call this with your consumer key, secret and callback URL, to
          generate a token for verification.