What am i doing wrong here?

I am using python to access my app , I have added code snippets below. Please help in finding the error here.
Step I:
I am generating a login url and logging in my account where I get my auth_code in the redirect_url.
Step 2:
I am storing that access_token in an local file, to use during the day in all the API calls.
Step 3:
When I call any API, I get this error

{
        "message": "Please provide valid token",
        "code": -15,
        "s": "error"
}

I have verified that the access_token used for the API call is the updated one.

Code Snippets:

Login:

    appSession = fyersModel.SessionModel(
        client_id=cr.app_id,
        redirect_uri=cr.redirect_url,
        response_type=cr.response_type,
        state=cr.state,
        secret_key=cr.secret_id,
        grant_type=cr.grant_type,
    )
    generateTokenUrl = appSession.generate_authcode()

Getting Data:

response = fyers.optionchain(
        data={
            "symbol": symbol,
            "strikecount": 1,
            "timestamp": "",
        }
    )

Hey @103445899023574176288

Can you DM your details so that we can connect and check this

Hey @WWhYB2qrsx , had sent you a message on dm. Please let me know how can we connect?

@WWhYB2qrsx Please let me know at the earliest if we can connect for this. Also, please acknowledge the DMs.

@103445899023574176288 , as per the update from our team, your concern has been addressed during the call. Kindly confirm.