I have previously used the OAuth1
class from the requests_oauthlib
module to authorize my request to Twitter by passing my consumer key
and consumer secret
key as parameters to OAuth1
and creating an object.
However, I was wondering how I could do the same thing and add my keys to my endpoint without the use of the requests_oauthlib
module or some other third party module. This is what I tried doing to build my endpoint:
url = "https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name=" + handle + "&count=" + str(count) + '&consumerkey=' + consumer_key + '&consumersecret=' + consumer_secret
However, it seems that consumerkey
and consumersecret
are not valid parameters. How can I add my keys as parameters to my endpoint directly without using an authorization client in Python?