I want to import my credentials from a .env file as this is a much more secure way.
I cant find instructions on the documentation: https://pypi.org/project/python-dotenv/ and similar question cant also help: Python to fetch LDAP credentials from JSON file
but basically I have and json variable ard code that it is currently working:
payload = {
'client_id': "12345",
'client_secret': 'a1234567803972de4472',
'refresh_token': 'c123456755647353200eae76387d8c47f52',
'grant_type': "refresh_token",
'f': 'json' }
Changed for security
I want to have those in a .env file and to import it just like that.
res = requests.post(auth_url, data=payload, verify=False)
access_token = res.json()['access_token']
thanks in andvance!