Batch request to get presence of multiple subscribed contacts using UCWA 2.0 API

418 Views Asked by At

We are using UCWA 2.0 API to subscribe to the presence of selected contacts. We followed the steps as mentioned here

After event channel is open, we are getting list of URL to get presence of each contact.

Can we use Batching request to get the presence of all the listed contacts at once?

If yes, We tried to execute the batch request but we are facing 400 Bad request error.

What we have tried is here :

POST /ucwa/oauth/v1/applications/102452001887/batch

Headers :

Authorization:Bearer <access_token>

Accept:multipart/batching

Host:webpoolmaain102.infra.lync.com

Content-Type:multipart/batching; boundary="77f2569d"

with Body:

{

--77f2569d

Content-Type: application/http;msgtype=request

GET /ucwa/oauth/v1/applications/102452001887/people/[email protected]/presence HTTP/1.1

Host: lyncweb.contoso.com

Accept: application/json

--77f2569d

Content-Type: application/http; msgtype=request

GET /ucwa/oauth/v1/applications/102452001887/people/[email protected]/presence HTTP/1.1

Host: lyncweb.contoso.com

Accept: application/json

--77f2569d

}

I have also tried to add headers as mentioned in UCWA 2.0 API document but still facing the same issue.

Could you please suggest if we are missing something and how can we process the batch request.

1

There are 1 best solutions below

0
On

enter image description here At the end of the last item requested you need a "--" example: --77f2569d--

Content-Type: application/http; msgtype=request
GET /ucwa/oauth/v1/applications/102452001887/people/[email protected]/presence HTTP/1.1
Host: lyncweb.contoso.com

Accept: application/json

--77f2569d--