The docs says that I can get the keys by this request:
POST https://iam.googleapis.com/v1/projects/PROJECT-ID/serviceAccounts/[email protected]/keys
I created a service account. For the example lets say:
SA-NAME = xxx
PROJECT-ID = yy-zz
When i do (Python)
import requests
url = 'https://iam.googleapis.com/v1/projects/yy-zz/serviceAccounts/[email protected]/keys'
try:
g = requests.post(url, verify=True)
except requests.exceptions.HTTPError as err:
print err
sys.exit(1)
print g
I get:
<Response [403]>
What am I doing wrong?