SecretID and SecretKey. SecretID is used to identify the API requester, while SecretKey is a key used for signature string encryption and authentication by the server. You can get them on the API Key Management page as shown below:

SecretKey to others.\\*.tencentcloudapi.com and varies by product. For example, the endpoint of CVM is cvm.tencentcloudapi.com. For specific endpoints, please see the API documentation of the corresponding product.npm install tencentcloud-sdk-nodejs --save
tencentcloud-sdk-nodejs with a specific product SDK name such as tencentcloud-sdk-nodejs-cvm/cbs/vpc to import the SDK of the specific product. In the code, you can change require("tencentcloud-sdk-nodejs") to require("tencentcloud-sdk-nodejs-cvm/cbs/vpc") and keep the rest unchanged, which can greatly save the storage space. For more information, please see the sample.const tencentcloud = require("tencentcloud-sdk-nodejs")// Import the client models of the corresponding product moduleconst CvmClient = tencentcloud.cvm.v20170312.Clientconst clientConfig = {// Tencent Cloud authentication informationcredential: {secretId: "secretId",secretKey: "secretKey",},// Product regionregion: "ap-shanghai",// Optional instance configurationprofile: {signMethod: "HmacSHA256", // Signature algorithmhttpProfile: {reqMethod: "POST", // Request methodreqTimeout: 30, // Request timeout period in seconds, which is 60s by default},},}// Instantiate the client object of the requested product (with CVM as an example)const client = new CvmClient(clientConfig)// Call the API you want to access through the client object; you need to pass in the request object and the response callback functionclient.DescribeZones().then((data) => {console.log(data)},(err) => {console.error("error", err)})
secretId and secretKey with real values.import * as tencentcloud from "tencentcloud-sdk-nodejs"// Import the client models of the corresponding product moduleconst CvmClient = tencentcloud.cvm.v20170312.Clientconst clientConfig = {// Tencent Cloud authentication informationcredential: {secretId: "secretId",secretKey: "secretKey",},// Product regionregion: "ap-shanghai",// Optional instance configurationprofile: {signMethod: "HmacSHA256", // Signature algorithmhttpProfile: {reqMethod: "POST", // Request methodreqTimeout: 30, // Request timeout period in seconds, which is 60s by default},},}// Instantiate the client object of the requested product (with CVM as an example)const client = new CvmClient(clientConfig)// Call the API you want to access through the client object; you need to pass in the request object and the response callback functionclient.DescribeZones().then((data) => {console.log(data)},(err) => {console.error("error", err)})
Client support the clientConfig data structure. For more information, please see ClientConfig.https_proxy; otherwise, it may not be called normally, and a connection timeout exception will be thrown.Feedback