MCPcopy Create free account
hub / github.com/Aniket762/playground / createAPIKeyFile

Function createAPIKeyFile

utils/createAPIKeyFile.js:3–21  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1const fs = require('fs')
2
3const createAPIKeyFile = () => {
4 let obj = {
5 "type": "service_account",
6 "project_id": "dazzling-seat-293205",
7 "private_key_id": process.env.PRIVATE_KEY_ID,
8 "private_key": (process.env.PRIVATE_KEY),
9 "client_email": process.env.CLIENT_EMAIL,
10 "client_id":process.env.CLIENT_ID,
11 "auth_uri": process.env.AUTH_URI,
12 "token_uri": process.env.TOKEN_URI,
13 "auth_provider_x509_cert_url": process.env.PROVIDER_CERT,
14 "client_x509_cert_url": process.env.CLIENT_CERT,
15 }
16
17 // console.log(obj.private_key);
18
19 const data = JSON.stringify(obj);
20 fs.writeFileSync('./utils/APIKey.json', data);
21}
22
23module.exports = { createAPIKeyFile };

Callers 1

server.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected