Skip to main content

@wildix/xbees-users-client > CreateBotApiKeyCommand

CreateBotApiKeyCommand class

Signature:

export declare class CreateBotApiKeyCommand extends CreateBotApiKeyCommand_base 

Extends: CreateBotApiKeyCommand_base

Example

Use a bare-bones client and the command you need to make an API call.

import { UsersClient, CreateBotApiKeyCommand } from "@wildix/xbees-users-client"; // ES Modules import
// const { UsersClient, CreateBotApiKeyCommand } = require("@wildix/xbees-users-client"); // CommonJS import
const client = new UsersClient(config);
const input = { // CreateBotApiKeyInput
company: "STRING_VALUE",
botId: "STRING_VALUE", // required
name: "STRING_VALUE",
};
const command = new CreateBotApiKeyCommand(input);
const response = await client.send(command);
// { // CreateBotApiKeyOutput
// bot: { // Bot
// id: "STRING_VALUE", // required
// name: "STRING_VALUE", // required
// picture: "STRING_VALUE",
// searchable: true || false,
// createdAt: "STRING_VALUE", // required
// updated: "STRING_VALUE",
// },
// key: { // BotApiKey
// secret: "STRING_VALUE", // required
// name: "STRING_VALUE",
// createdAt: "STRING_VALUE", // required
// },
// };