1

I am tied to using UCWA v1.0 and I can find no documentation for it ... all Micrsoft UCWA documentation seems to point back to v2.0. For example, the following, Lync 2013

The specific problem I am having is related to receiving an incoming message.
This is well documented for v2.0, Receiving an IM.
This references the need to 'accept' an incoming message invitation using the href provided by the incoming event response.
This can be seen from the following snippet from the example event response.

            "messagingInvitation": {
              "direction": "Incoming",
              "importance": "Normal",
              "threadId": "Ac7bUftwUcVMzgTzRl+OQchCsUn35Q==",
              "state": "Connecting",
              "subject": "",
              "_links": {
                "self": {
                  "href": "/ucwa/oauth/v1/applications/104/communication/messagingInvitations/6408"
                },
                "to": {
                  "href": "/ucwa/oauth/v1/applications/104/people/toshm@contoso.com"
                },
                "conversation": {
                  "href": "/ucwa/oauth/v1/applications/104/communication/conversations/eee0"
                },
                "accept": {
                  "href": "/ucwa/oauth/v1/applications/104/communication/messagingInvitations/6408/accept"
                },
                "decline": {
                  "href": "/ucwa/oauth/v1/applications/104/communication/messagingInvitations/6408/decline"
                },
                "messaging": {
                  "href": "/ucwa/oauth/v1/applications/104/communication/conversations/eee0/messaging"
                },
                "message": {
                  "href": "data:text/plain;charset=utf-8,Hi+Tosh%0d%0a"
                }
              },

Unfortunately, in v1.0 I do not get an 'accept' href. The following snippet is what I get in my event response.

              "messagingInvitation": {
                "direction": "Incoming",
                "importance": "Normal",
                "threadId": "AdIoE6o5brzgPHMtT/KvKJPoa2JkpQAAJQgQAAB7VhA=",
                "state": "Connecting",
                "subject": "",
                "_links": {
                  "self": {
                    "href": "/ucwa/oauth/v0/applications/14263104276/invitations(\u00276855de527cbd42d8a050eb85c6471825\u0027)"
                  },
                  "to": {
                    "href": "/ucwa/oauth/v0/applications/14263104276/people(\u0027test.user1@test.mydomain.au\u0027)"
                  },
                  "answeredByContact": {
                    "href": "/ucwa/oauth/v0/applications/14263104276/people(\u0027test.user1@test.mydomain.au\u0027)"
                  },
                  "answer": {
                    "href": "/ucwa/oauth/v0/applications/14263104276/invitations(\u00276855de527cbd42d8a050eb85c6471825\u0027)/answer"
                  },
                  "conversation": {
                    "href": "/ucwa/oauth/v0/applications/14263104276/conversations(\u0027e8fb2fc1-dcfe-4941-93fa-aaf7e3f63e51\u0027)"
                  },
                  "decline": {
                    "href": "/ucwa/oauth/v0/applications/14263104276/invitations(\u00276855de527cbd42d8a050eb85c6471825\u0027)/decline"
                  },
                  "messaging": {
                    "href": "/ucwa/oauth/v0/applications/14263104276/conversations(\u0027e8fb2fc1-dcfe-4941-93fa-aaf7e3f63e51\u0027)/messaging"
                  },
                  "message": {
                    "href": "cid:81774e95-8783-46b2-85cb-f0c480f26570"
                  }
                },

It appears that the 'answer' href may be the equivalent but when I try to do a POST with no payload I am getting a 404 Not Found.
Of course, the lack of any documentation, makes it difficult to proceed.
Note: I can get the 'decline' to work by doing a POST and using the payload defined by the UCWA v2.0 API.

Does anyone out there have the UCWA v1.0 API reference?
Or does anyone know how to accept/answer a message invitation with UCWA v1.0?

boraseoksoon
  • 2,164
  • 1
  • 20
  • 25
smillied
  • 23
  • 6
  • Have you tried any HTTP verbs, other than POST? I.e PUT/PATCH – Dylan Watson Oct 17 '16 at 03:29
  • Yes I have. My suspicion is that the 'answer' href is correct and that it should be a POST that requires some payload. When I try the 'decline' without a payload I also get a 404, but yet it works fine with the correct payload. So I think the 404 is misleading. – smillied Oct 17 '16 at 05:26
  • 1
    You are not actually using v1 of UCWA, but what looks to be a beta install of it based on the path of the links returned (v0/...). Many of those things changed when moving from the beta to the actual release. Is it possible to update to the latest (or even later) CUs for Lync 2013 as that might push the UCWA service from your v0 to v1 paths. – ShelbyZ Oct 17 '16 at 15:45
  • 1
    @ShelbyZ Thanks for the comment. I believe you are correct. Upon applying the cumulative update a little earlier, it did indeed have the effect you predicted ... I am now seeing v1 paths and am getting the 'accept' href as per documentation. – smillied Oct 17 '16 at 16:19

1 Answers1

1

I am still uncertain about the version of UCWA. As noted in the original question, all Microsoft's UCWA documentation appears to lead to UCWA version 2 documentation. And version 2 documentation includes many samples that include URL paths that include v1. For example, from here

/ucwa/oauth/v1/applications/104/communication/messagingInvitations/6408/accept

We installed Lync Server 2013 v5.0.8308.0 which came from MSDN. This appears to include an unsupported version of UCWA. The version of UCWA includes URL paths that include v0. For example.

/ucwa/oauth/v0/applications/14263104276/invitations(\u00276855de527cbd42d8a050eb85c6471825\u0027)/answer

We applied cumulative patches to Lync Server 2013, bringing it up to v5.0.8308.872.

Doing this appears to have updated UCWA to be inline with the documentation, and now provides the 'accept' href in place of 'answer'.

Whether this is v1 or v2 of UCWA remains unclear.

smillied
  • 23
  • 6