I want to access the live streaming of my Google nest camera using the Google Apis.
So far I've managed to:
I was able to obtain authorization following the guide but, this is not how I want to gain access.
Is it not possibile to create a service account that authenticates without following the OAuth consent screen?
I tried to do this with a small js code using googleapis npm package
const scopes = ['https://www.googleapis.com/auth/sdm.service'];
const auth = new google.auth.GoogleAuth({
keyFile: './key.json',
scopes
});
const client = await auth.getClient();
google.options({ auth: client });
const sdm = google.smartdevicemanagement({
version: 'v1'
});
But it keep telling me that the enterprise id is not found. It seems to me that the service account is not linked to "Device access console".
I tried also to give Google Home Developer Console Admin
role to the service account.
Is there a way to link the service account?
Thanks
Since you are accessing first party cameras that belong to users we designed the 3P access flow by requiring the OAuth screen to be shown to the users in order to access Google devices with device access APIs by needing the tokens for the OAuth flow.
It's not possible to access using service accounts.