I can not create google.androidmanagement
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2024 01:45 AM
Hi I created service account on my google could project got my public and private json keys.
now i am trying to create google.androidmanagement this is my code pleases give me an advice
"
const SERVICE_ACCOUNT_KEY_FILE = 'C:\\Users\\User\\Desktop\\happyIconProjects\\MDM github\\AndroidManagmentAPI\\backend\\src\\Google\\keys\\mobile-device-managment-409407-20c331616ec6.json';
async function createAndroidManagementClient() {
console.log(SERVICE_ACCOUNT_KEY_FILE)
const jsonContent = await fs.readFile(SERVICE_ACCOUNT_KEY_FILE, 'utf8');
const serviceAccount = JSON.parse(jsonContent);
const authClient = await auth.fromJSON(serviceAccount, SCOPES);
console.log("we passed here ")
console.log(authClient)
console.log("****************************")
const androidmanagement = google.androidmanagement({
version: 'v1',
auth: authClient,
});
return androidmanagement;
}
"
0 REPLIES 0
Related Content
- Securing your Business: Checklist for Android device offboarding in Tips & guides
- After creating a new user via createAndManageUser, how can the DISALLOW_OUTGOING_CALLS restriction be removed? in General discussions
- Android CPU Runtime and Battery Consumption in General discussions
- Deleting Third party app cache without device owner status - NotE that my app is signed by OEM in General discussions
- [Community Tips] What processes have you created around testing? in General discussions