Hi, @csar19783364. I see the cause of the 422 status. Your URL appears to be for the correct endpoint, but it must have a query. Twitter does not know what to send you as a response, because you have not specified, in a query.
You will see, in the docs, that query is required (under the section: Data request parameters)
https://developer.twitter.com/en/docs/tweets/search/api-reference/premium-search
Instead of just:
https://api.twitter.com/1.1/tweets/search/30day/my_env_name.json
try:
https://api.twitter.com/1.1/tweets/search/30day/my_env_name.json?query=from:SomeTwitterHandle
The Twitter API response to the first request, without a query, does pinpoint the issue.
HTTP/1.1 422 Unprocessable Entity
content-type: application/json; charset=utf-8
date: Thu, 08 Feb 2018 15:18:36 GMT
UTC; Path=/; Domain=.twitter.com
{"error":{"message":"There were errors processing your request: Missing required parameter:'query', Missing required parameter:'query'","sent":"2018-02-08T15:18:36+00:00","transactionId":"00473ca4002e88c"}}
It is worth receiving the API response body for the error message, as well as the status code returned.