在ms小组中设置标签时,出现以下错误,
无法保存“我的标签”标签的配置
请求方法:PUT
此请求已返回以下响应,
{“错误代码”:201,“消息”:“由于:无效参数而失败。”}
找不到与此相关的任何文档。
有人可以帮我吗?
谢谢。
答案 0 :(得分:0)
以下是标签配置代码:
microsoftTeams.settings.setValidityState(true);
microsoftTeams.settings.registerOnSaveHandler(saveEvent => {
const origin = window.location.origin;
const contentUrl = `${origin}/teams/index.html`;
microsoftTeams.settings.setSettings({
entityId: 'example.teams.teamcontext',
contentUrl,
suggestedDisplayName: 'test data',
});
saveEvent.notifySuccess();
Manifest.json
{
"$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.5/MicrosoftTeams.schema.json",
"manifestVersion": "1.5",
"version": "1.1.0",
"id": "f1369b33-bdde-4587-908f-ttt",
"packageName": "com.example.teams",
"developer": {
"name": "Test Example",
"websiteUrl": "https://www.example.com",
"privacyUrl": "https://www.example.com/corp/privacy-policy/",
"termsOfUseUrl": "https://www.example.com/corp/terms-of-service/"
},
"name": {
"short": "Test Example",
"full": "Test Example"
},
"description": {
"short": "Test Example",
"full": ""
},
"icons": {
"outline": "",
"color": ""
},
"accentColor": "#FFFFFF",
"configurableTabs": [{
"configurationUrl": "https://example.serveo.net/teams/index.html#/teams-configure",
"canUpdateConfiguration": true,
"scopes": [
"team"
]
}],
"staticTabs": [{
"entityId": "com.example.teams",
"name": "Test Example",
"contentUrl": "https://example.serveo.net/teams/index.html",
"scopes": [
"personal"
]
}],
"bots": [{
"botId": "d564-403f-8039-d0834b8a",
"needsChannelSelector": false,
"isNotificationOnly": false,
"commandLists":[
{
"scopes": [
"personal"
],
"commands": [
{
"title": "/ti",
"description": "Get your Todays Insigts set of cards"
},
}
],
"scopes": [
"team",
"personal"
]
}],
"permissions": [],
"validDomains": ["www.yandex.ru", "www.google.ru", "bash.org.ru", "*.example.com", "*.example.eu"]
}