Good afternoon,
I have been trying to use Twitter premium API (Sandbox), in order to retrieve tweets of the last 30 days. As mentioned in Twitter’s documentation, I created an app, generated an access token and then used postman to get tweets from the last 30 days, using the premium API in the Sandbox environment. I tried to run the following POST request:
https://api.twitter.com/1.1/tweets/search/30day/mydev.json?query=(...)&maxResults=100
In the Authorization tab of the request, I opted for Bearer token and entered the access token details that I have on my developer twitter account; however I get the following error:
{
"error": {
"message": "Invalid or expired token.",
"sent": "2020-09-02T13:42:41+00:00",
"transactionId": "XXXX"
}
}
I got the same error when I changed the Authorization type to OAuth 2.0, and the following error when I set the type to OAuth 1.0:
{
"error": {
"message": "Could not authenticate you.",
"sent": "2020-09-02T13:56:38+00:00",
"transactionId": "XXXX"
}
}
I am not sure what I have done wrong, any advice on this would be really appreciated!