adamwynne / twitter-api

Async io interface to all the twitter APIs
372 stars 64 forks source link

Need help for /1.1/users/lookup request #84

Closed msohaibali closed 4 years ago

msohaibali commented 4 years ago

I am trying to do request on users/lookup route of Twitter API using params of Email/Phone. In the result I am getting error Could not authenticate you. in response

While using the same credentials when i do request for screen_name, user_id lookup I am getting perfect Response. Not only that all other api requests like home_timeline, followers_ids, friends_ids, etc are working fine with same credentials but on that specific request, I am getting this error. My Request is:

import requests

url = "https://api.twitter.com/1.1/users/lookup.json?map=true&phone=1234567890"

payload = {}

headers = {
    'Authorization': 'OAuth realm="http%3A%2F%2Fapi.twitter.com",oauth_consumer_key="<consumer_key>",oauth_token="<outh_token>",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1595318479",oauth_nonce="<nonce>",oauth_version="1.0",oauth_signature="<sig>"'
}

response = requests.request("GET", url, headers=headers, data = payload)
print(response.text.encode('utf8'))

In Response I am getting this Error:

{
    "errors": [
        {
            "code": 32,
            "message": "Could not authenticate you."
        }
    ]
}

What are the reasons and suggestions on this ? Will appreciate the positive feedback.

chbrown commented 4 years ago

Sir, this is a Clojure library.

😉  you might have better luck at https://github.com/bear/python-twitter or similar 👍

chbrown commented 4 years ago

P.S. @msohaibali not cool, dude, not cool. ↴ Screen Shot 2020-07-21 at 12 24 59 PM

msohaibali commented 4 years ago

@chbrown Thanks for your time. Yeah dude I have issued ticket in the repostories using Twitter API. Because what I am looking for is linked with Twitter API, and I am not a spammer. You can check I have only commented in those repositories which have Twitter API. :)

andypiper commented 4 years ago

... except you've spammed 12 repositories, and Stack Overflow, and the parameters you're trying to use are not supported in the Twitter API, as per the documentation.