Skip to main content

@wildix/wms-api-client > CreatePbxOAuth2ClientCommand

CreatePbxOAuth2ClientCommand class

Create new OAuth2 client in the PBX.

Signature:

export declare class CreatePbxOAuth2ClientCommand extends CreatePbxOAuth2ClientCommand_base 

Extends: CreatePbxOAuth2ClientCommand_base

Example

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

import { WmsApiClient, CreatePbxOAuth2ClientCommand } from "@wildix/wms-api-client"; // ES Modules import
// const { WmsApiClient, CreatePbxOAuth2ClientCommand } = require("@wildix/wms-api-client"); // CommonJS import
const client = new WmsApiClient(config);
const input = { // CreatePbxOAuth2ClientInput
name: "STRING_VALUE", // required
redirectUri: [ // PbxOAuth2RedirectUrls // required
"STRING_VALUE",
],
};
const command = new CreatePbxOAuth2ClientCommand(input);
const response = await client.send(command);
// { // CreatePbxOAuth2ClientOutput
// type: "result" || "error", // required
// result: { // PbxOAuth2Client
// id: "STRING_VALUE", // required
// name: "STRING_VALUE", // required
// redirectUri: [ // PbxOAuth2RedirectUrls // required
// "STRING_VALUE",
// ],
// secret: "STRING_VALUE", // required
// created: Number("int"), // required
// origins: [ // PbxOAuth2Origins // required
// "STRING_VALUE",
// ],
// accessTokenTtl: Number("int"), // required
// },
// };