401 unauthorized response while trying to get ingress session

I generated a long live token to use it to be able to get a valid ingress session through a python script but it always response with a 401 unauthorized any idea how to fix it?
here is the code:

import requests
url = “
TOKEN=‘long live token’
headers = {
“Connection”: “keep-alive”,
“Content-Length”: “0”,
“Pragma”: “no-cache”,
“Cache-Control”: “no-cache”,
“Authorization”: “Bearer {}”.format(TOKEN),
“User-Agent”: “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.75 Safari/537.36”,
“Accept”: “/”,
“Origin”: “”,
“Referer”: “”,
“Accept-Language”: “es-ES,es;q=0.9”,

response = requests.post(url, headers=headers)