Erro retornado
400
Traceback (most recent call last):
File "recent_search.py", line 53, in <module>
main()
File "recent_search.py", line 48, in main
json_response = connect_to_endpoint(url, headers)
File "recent_search.py", line 40, in connect_to_endpoint
raise Exception(response.status_code, response.text)
Exception: (400, '{"errors":[{"parameters":{" end_time ":[" 2022-05-21T00:00.00Z"]},"message":"The query parameter [ end_time ] is not one of [query,start_time,end_time,since_id,until_id,max_results,next_token,pagination_token,sort_order,expansions,tweet.fields,media.fields,poll.fields,place.fields,user.fields]"},{"parameters":{" user.fields ":[" id, name, username, created_at"]},"message":"The query parameter [ user.fields ] is not one of [query,start_time,end_time,since_id,until_id,max_results,next_token,pagination_token,sort_order,expansions,tweet.fields,media.fields,poll.fields,place.fields,user.fields]"},{"parameters":{"expansions ":[" author_id "]},"message":"The query parameter [expansions ] is not one of [query,start_time,end_time,since_id,until_id,max_results,next_token,pagination_token,sort_order,expansions,tweet.fields,media.fields,poll.fields,place.fields,user.fields]"},{"parameters":{"start_time ":[" 2022-14-15T00:00.00Z "]},"message":"The query parameter [start_time ] is not one of [query,start_time,end_time,since_id,until_id,max_results,next_token,pagination_token,sort_order,expansions,tweet.fields,media.fields,poll.fields,place.fields,user.fields]"},{"parameters":{"tweet.fields":["author_id, conversation_id, created_at, id, in_reply_to_user_id, public_metrics, text"]},"message":"The `tweet.fields` query parameter value [ conversation_id] is not one of [attachments,author_id,context_annotations,conversation_id,created_at,entities,geo,id,in_reply_to_user_id,lang,non_public_metrics,organic_metrics,possibly_sensitive,promoted_metrics,public_metrics,referenced_tweets,reply_settings,source,text,withheld]"},{"parameters":{"tweet.fields":["author_id, conversation_id, created_at, id, in_reply_to_user_id, public_metrics, text"]},"message":"The `tweet.fields` query parameter value [ created_at] is not one of [attachments,author_id,context_annotations,conversation_id,created_at,entities,geo,id,in_reply_to_user_id,lang,non_public_metrics,organic_metrics,possibly_sensitive,promoted_metrics,public_metrics,referenced_tweets,reply_settings,source,text,withheld]"},{"parameters":{"tweet.fields":["author_id, conversation_id, created_at, id, in_reply_to_user_id, public_metrics, text"]},"message":"The `tweet.fields` query parameter value [ id] is not one of [attachments,author_id,context_annotations,conversation_id,created_at,entities,geo,id,in_reply_to_user_id,lang,non_public_metrics,organic_metrics,possibly_sensitive,promoted_metrics,public_metrics,referenced_tweets,reply_settings,source,text,withheld]"},{"parameters":{"tweet.fields":["author_id, conversation_id, created_at, id, in_reply_to_user_id, public_metrics, text"]},"message":"The `tweet.fields` query parameter value [ in_reply_to_user_id] is not one of [attachments,author_id,context_annotations,conversation_id,created_at,entities,geo,id,in_reply_to_user_id,lang,non_public_metrics,organic_metrics,possibly_sensitive,promoted_metrics,public_metrics,referenced_tweets,reply_settings,source,text,withheld]"},{"parameters":{"tweet.fields":["author_id, conversation_id, created_at, id, in_reply_to_user_id, public_metrics, text"]},"message":"The `tweet.fields` query parameter value [ public_metrics] is not one of [attachments,author_id,context_annotations,conversation_id,created_at,entities,geo,id,in_reply_to_user_id,lang,non_public_metrics,organic_metrics,possibly_sensitive,promoted_metrics,public_metrics,referenced_tweets,reply_settings,source,text,withheld]"},{"parameters":{"tweet.fields":["author_id, conversation_id, created_at, id, in_reply_to_user_id, public_metrics, text"]},"message":"The `tweet.fields` query parameter value [ text] is not one of [attachments,author_id,context_annotations,conversation_id,created_at,entities,geo,id,in_reply_to_user_id,lang,non_public_metrics,organic_metrics,possibly_sensitive,promoted_metrics,public_metrics,referenced_tweets,reply_settings,source,text,withheld]"}],"title":"Invalid Request","detail":"One or more parameters to your request was invalid.","type":"https://api.twitter.com/2/problems/invalid-request"}')