I am building a Chrome web extension app that will allow me to check whether all users in some Google workspace have some settings enabled.
I am not the owner of any of these workspaces, so I will need permission from the workspace admins.
I have created a base chrome app, and am able to load it into chrome. I have used chrome.identity.getAuthToken({interactive:true}, function(token) { ... }
to retrieve an OAuth token from the user using the extension.
My intention was to use this OAuth token to access the google Admin SDK and use the GET https://admin.googleapis.com/admin/reports/v1/usage/users/{userKey or all}/dates/{date}
API call to retrieve the information on user settings, which can be found under the accounts reports. [link]
However, I am unsure as to how I can use the retrieved OAuth token to access this API.
Is the Admin SDK the best way to go about retrieving this data? If so, how do I get access to the Google workspaces using this token?