post https://api.authing.cn/api/v3/create-role
可选获取用户的 Identities 数组、自定义数据、所在部门 ID 列表。
Log in to see full request history
Responses
可选获取用户的 Identities 数组、自定义数据、所在部门 ID 列表。
xxxxxxxxxx
18import { ManagementClient } from 'authing-node-sdk';
// 在 Node.js 中引用:
// const { ManagementClient } = require('authing-node-sdk');
const managementClient = new ManagementClient({
accessKeyId: 'YOUR_ACCESS_KEY_ID',
accessKeySecret: 'YOUR_ACCESS_KEY_SECRET',
});
(async () => {
const result = await managementClient.createRole(
{
code: "role1",
description: "this is description",
namespace: "default"
}
)
})();
Try It!
to start a request and see the response here! Or choose an example: