我需要从Skype for Business获取有关未接/已接电话,来电显示/姓名等的信息。

时间:2019-01-11 11:55:20

标签: rest skype skype-for-business skypedeveloper

我需要从Skype for Business获得有关未接/已接电话,来电显示/姓名等的信息。我读到可以在UCWA中使用事件香奈儿。 但是我无法从现有的API中获取信息。

1)在第一步中,我发送以下请求:


    GET  https://api.skypeforbusiness.com/platformservice/discover

响应


    {
      "_links": {
        "self": {
          "href": "https://api.skypeforbusiness.com:4443/platformservice/discover"
        },
        "myApplications": {
          "href": "https://ring2noammeetings.resources.lync.com/platformService/v1/myApplications"
        },
        "myOnlineMeetings": {
          "href": "https://webpooldm20r04.infra.lync.com/platformService/v1/applications/onlinemeetings/myonlinemeetings"
        },
        "service:applications": {
          "href": "https://ring2noammeetings.resources.lync.com/platformService/v1/applications"
        },
        "applications": {
          "href": "https://ring2noammeetings.resources.lync.com/ucwa/v1/applications"
        }
      },
      "rel": "service:discover"
    }

2)之后,我发送请求以从第一个响应中获取一个end_points的access_token。例如:


    POST https://login.microsoftonline.com/<tenant_id>/oauth2/token
    Content-Type: application/x-www-form-urlencoded

    grant_type=password
    &scope=openid
    &client_id=<client_id>
    &resource=https://webpooldm20r04.infra.lync.com
    &username=<username>
    &password=<password>

响应


    {
      "token_type": "Bearer",
      "scope": "Contacts.ReadWrite Conversations.Initiate Conversations.Receive Meetings.ReadWrite User.ReadWrite",
      "expires_in": "3600",
      "ext_expires_in": "3600",
      "expires_on": "1547205244",
      "not_before": "1547201344",
      "resource": "https://webpooldm20r04.infra.lync.com",
      "access_token": "eyJ...",
      "refresh_token": "AQA...
      "id_token": "AyJ..."
    }

3)之后,我尝试发送以下请求:


    GET https://webpooldm20r04.infra.lync.com/platformService/v1/applications/onlinemeetings/myonlinemeetings/<client_id>
    Content-Type: application/json
    Autho

rization: Bearer eyJ...

响应


    HTTP/1.1 403 Forbidden
    {
      "code": "Forbidden",
      "message": "Exception of type \u0027PlatformService.Web.PlatformServiceWebException\u0027 was thrown.",
      "debugInfo": {
        "errorReportId": "772..."
      }
    }

4)我无法从任何端点获取信息。


    "myApplications" -> 403
    "myOnlineMeetings" -> 403
    "service:applications" -> 403
    "applications" -> 401

我错了什么?有人可以帮我吗。

0 个答案:

没有答案