在Microsoft团队中设置标签时出错

时间:2019-06-28 09:08:53

标签: microsoft-teams

在ms小组中设置标签时,出现以下错误,

无法保存“我的标签”标签的配置

在检查网络上,https://amer.ng.msg.teams.microsoft.com/v1/threads/19%3Ac05017f762dd44458a82bb57d6a855d9%40thread.skype/properties?name=tab%3A%393844f6095537dd7c51d3ad

请求方法:PUT

此请求已返回以下响应,

{“错误代码”:201,“消息”:“由于:无效参数而失败。”}

找不到与此相关的任何文档。

有人可以帮我吗?

谢谢。

1 个答案:

答案 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"]
}