GET request while access token is changing

I wrote a python script which sends GET requests to some particular website.
In order to perform this request, I need to attach the access token that I was given when I logged in.
The problem is that the access token is changing each 15 min, and I have to find it over and over again by using Chrome Devtool (Network tab). I was wondering if there is any way to obtain the new token automatically, or any other way to perform this GET request without using this access token but only the credentials (Username and Password) for this website.
Right now, this is how I’m doing this (Notice that the data provided is not real, so please don’t try to use) :

url = ""

querystring = {"access_token":"cfc6f6d22f00303fb7ac--f","envId":"58739be2c2","folderId":"active","sortBy":"status"}

headers = {
    'origin': "",
    'accept-encoding': "gzip, deflate, br",
    'accept-language': "en-US,en;q=0.9",
    'user-agent': "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36",
    'accept': "application/json, text/plain, */*",
    'referer': "",
    'connection': "keep-alive",
    'cache-control': "no-cache",

response = requests.request("GET", url, headers=headers, params=querystring)

JSON_format = response.json()

How can i refresh authentication token generated using chrome.identity namespace?

I am creating a chrome extension for gmail. I have generated an access_token to call gmail api. But seems like access token has an expiration time. Will my extension work if the token has expired? If it doesn’t how can i handle this? And if it works then how will the token be refreshed?