To get the data I'm using the code provided by tripit support to be used with python 3:
from requests_oauthlib import OAuth1Session
session = OAuth1Session(TRIPIT_CONSUMER_KEY,
client_secret=TRIPIT_CONSUMER_SECRET,
resource_owner_key=TRIPIT_TOKEN,
resource_owner_secret=TRIPIT_TOKEN_SECRET)
url = 'https://api.tripit.com/v1/list/trip/past/false/page_size/100'
response = session.get(url)
The response I get:
Access Denied
You don't have permission to access "http://api.tripit.com/v1/list/trip/past/false/page_size/100" on this server.
Reference #18.54e1dd17.1666693604.426b167c
status_code is 403
When the same code is used locally or on Heroku, it works as intended.