I would like to call the instagram api with a server.
I tried following on my local system:
curl https://api.coingecko.com/api/v3/coins/list -->works perfectly
curl https://www.instagram.com/zitate.flx/?__a=1 -->works perfectly
on the linux server:
curl https://api.coingecko.com/api/v3/coins/list -->works perfectly
curl https://www.instagram.com/zitate.flx/?__a=1 -->doesn't work
My question: why does the request to the instagram API work on my local system but not on the server?
import requests
def create_session():
cookie = {"name": "sessionid", "value":"{this is your session id}"}
session = requests.Session()
session.cookies.set(**cookie)
return session
s = create_session()
response = s.get(https://www.instagram.com/zitate.flx/?__a=1)