Some while ago, I have created an api key to access Google Drive. This api key is still working today. I can download files from Google Drive with this api key.
I am making an http request to
https://www.googleapis.com/drive/v3/files/{fileId}/export
with the parameters
$apiParams = [
‘key’ => $key,
‘mimeType’ => ‘application/vnd.openxmlformats-officedocument.spreadsheetml.sheet’,];
The fileId and the key are correcly configured. I can download the Spreadsheet file from Google Drive. This is fine. I am using a php httpClient for the http request. The response contains the contents of the file on Google Drive.
I wonder where my Google Drive API Key is defined. Where could I revoke it if I wanted to. Where could I enable more rights to it. I am looking at the Google API Console https://console.cloud.google.com/. I have several google accounts. For some of them there are no projets defined so I don’t find any keys. For one of them the name of the project matches the project that I am working on but when I look at the logs there is no traffic on Google Drive, and I don’t find the key either.
I connected to Google Console https://console.cloud.google.com/ with several google accounts.
I tried to browse the interface, to download the files and to watch the logs.
I did not find neither the key nor any activity on the logs.
I am not 100% sure of the google account associated to the api key.
I expected, after running the http request, at least to find some activity on the only google account having a matching project name. Other google accounts do not have projects defined on the google console.
I expected to find a screen “API Keys” and to find some information matching the api key that I am using, either the key itself or a hashed value of the key or the creation date or something similar.
Michel Diemer is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.