Error 403

search

#1

DEBUG:root:ResultStream:
{
“username”: null,
“endpoint”: “https://api.twitter.com/1.1/tweets/search/:30day/:sandbox/counts.json”,
“rule_payload”: {
“query”: “rihanna”,
“maxResults”: 100
},
“tweetify”: false,
“max_results”: 100
}
INFO:searchtweets.result_stream:using bearer token for authentication
INFO:searchtweets.result_stream:disabling tweet parsing due to counts API usage
DEBUG:searchtweets.result_stream:sending request
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.twitter.com
DEBUG:urllib3.connectionpool:https://api.twitter.com:443 “POST /1.1/tweets/search/:30day/:sandbox/counts.json HTTP/1.1” 403 172
WARNING:searchtweets.result_stream:retrying request; current status code: 403
DEBUG:searchtweets.result_stream:sending request

I think there might be somehting wrong with the endpoint URL - it should be https://api.twitter.com/1.1/tweets/search/30day/sandbox/counts.json, I guess and I changed it as shown here,
but the query still gives a 422 error (which I think is due to the filter-rule query, but that is very odd).


#2

Hello @worknehy
The counts endpoint is only available with the paid Premium version of this API.