Hi All
A question about using the premium search API. I’m getting the following error message:
{u’error’: {u’message’: u’Bad Authentication data.’, u’transactionId’: u’00bc8a600050bbc2’, u’sent’: u’2018-08-05T17:05:14+00:00’}}
-
I’ve used my consumer key and secret to get a bearer token. (i.e.: AAAAAAAAAAAAAAAAAAAAAIgL8AAAAAAAj3VH…) which I pass to a variable called access_token
-
Using Python requests library, I build my request:
base_url = “https://api.twitter.com/1.1/tweets/search/fullarchive/mydevname.json”
my_headers = {‘Authorization’ : access_token, ‘Content-type’:‘application/json’}
my_data = {“query” : “twitter”}
-
Then I make my request:
response = requests.post(base_url, headers=my_headers, data=my_data)
response_body = response.json()
When I print response_body, I get the above mentioned error:
{u’error’: {u’message’: u’Bad Authentication data.’, u’transactionId’: u’00bc8a600050bbc2’, u’sent’: u’2018-08-05T17:05:14+00:00’}}
Thanks in advance.