import requests

client_id = '1bdf3852c7294e488c8d206293a7bf26'
client_secret = 'b73831e1e7d44bb2a2a3b4cef4dac304'

auth_url = 'https://accounts.spotify.com/api/token'

data = {
    'grant_type': 'client_credentials',
    'client_id': client_id,
    'client_secret': client_secret,
}

auth_response = requests.post(auth_url, data=data)

access_token = auth_response.json().get('access_token')

print(access_token)


https: // www.alecchen.dev/spotify-refresh-token


