Looker API with Python

Hi,
I am trying to download some dashboards through looker with Looker API. I tried multiple ways to log in looker followed by the instruction on the website, but none of them success. Can anyone provide me a basic way to first pass the authorization step of Looker API.

Example code tried:
import requests

def log_me_in(id, secret, base_url):
payload = {‘client_id’: id, ‘client_secret’: secret}
url = base_url + ‘/login’
r = requests.post(url, data=payload)
# check for successful auth
if r.status_code == 200:
token = r.json()[‘access_token’]
return token
else:
print(‘Authentication failed’)

def get_look(token, look_id, base_url):
# hard coded for json format response
url = base_url +’/looks/’ + look_id + ‘/run/json?access_token=’ + token
r = requests.get(url)
if r.status_code == 200:
for elem in r.json():
print(str(elem))

0 9 9,464