How to accept a Lync conversation invite in the UCWA 1.0 API

274 views Asked by At

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/[email protected]"
                },
                "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(\[email protected]\u0027)"
                  },
                  "answeredByContact": {
                    "href": "/ucwa/oauth/v0/applications/14263104276/people(\[email protected]\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?

1

There are 1 answers

0
smillied On BEST ANSWER

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.