Author Message
dkalinasch
Joined: May 16, 2019
Messages: 35
Offline
Hello,

we have build an application that uses the presence rest api.
Connecting to the the Event Delivery Snapin and receiving updates work fine with:

Event Delivery Snapin: 7.1.2.0.9
Presence Services Snapin: 7.1.2.0.233

We are able to authenticate, create a pubSub container and long poll the events.
Here a part of the response from presence after login:

{
"presenceImResources": {
"userId": "502",
"clientId": "clientCustomer",
"resources": {
"notificationService": {
"longPolling": {
"method": "GET",
"href": "https://PresenceServer/services/EventDelivery/event-delivery/channels/long-polling/users/502/clients/clientCustomer"
}
}......


But with the following snapin versions, the long polling request result in a "400 Bad Request":
Event Delivery Snapin: 8.1.2.0.3
Presence Services Snapin: 8.1.2.0.23

Here a part of the response after login (login and pubSub container works):

{
"presenceImResources": {
"bsid": "57f2ef45-61ea-4079-bdc3-1a94a1569501",
"clientId": "clientCustomer",
"resources": {
"notificationService": {
"longPolling": {
"method": "GET",
"href": "https://PresenceServer/services/EventDelivery/event-delivery/channels/long-polling/bsid/57f2ef45-61ea-4079-bdc3-1a94a15695/clients/clientCustomer"
}
}...


I dont understand why userid is not in the response, and what the bsid is used for.

The latest documentation that i have found was "Release 8.1.0 March 2019". In this document the bsid is not described.

Kind regards,
Domenic
Pavan
Joined: May 5, 2020
Messages: 3
Offline
Hi Dominic,

This was done as part of CSRF changes to add extra security.
We no longer support user id in url's, instead bsid should be used.


Thanks,
Pavan
dkalinasch
Joined: May 16, 2019
Messages: 35
Offline
Hello Pavan,

thanks for your response.

If i use the request with the bsid:

https://PresenceServer/services/EventDelivery/event-delivery/channels/long-polling/bsid/57f2ef45-61ea-4079-bdc3-1a94a15695/clients/clientCustomer

The request results in a "400 Bad Request".

The logfile contains the following entries (log level is "all")

2020-05-05 14:27:33,844 [WebContainer : 5] EventDelivery FINE - EventDelivery-8.1.2.0.3 - doGet() subscribing to notification URL=/EventDelivery-8.1.2.0.3/event-delivery/channels/long-polling/bsid/3d17183d-ad29-4e29-9878-657a7236dd64/clients/12345
2020-05-05 14:27:33,845 [WebContainer : 5] EventDelivery FINEST - EventDelivery-8.1.2.0.3 - validateRequestAndGetRestPathParameters() active threads=1135
2020-05-05 14:27:33,845 [WebContainer : 5] EventDelivery ERROR - EventDelivery-8.1.2.0.3 - validateRequestAndGetRestPathParameters() sending error response indicating that the request was bad


Any idea, why the request is bad?

Kind regards,
Domenic
dkalinasch
Joined: May 16, 2019
Messages: 35
Offline
message deleted
dkalinasch
Joined: May 16, 2019
Messages: 35
Offline
Hello,

i have downloaded the presence snapin bundle with version8.1.2.0.140.
The bundle only contains the PResence Rest API documentation with release 8.1.0 from March 2019.

I can not find any description about the bsid.

Have there been other changes?

The problem is still that i can not execute the long poll request.
The logfiles of the EventDelivery Snapin only complains about bad request:
validateRequestAndGetRestPathParameters() sending error response indicating that the request was bad

I am using the request from the login response, so i do not change any parameters.

Where can i find more information about the error? (Maybe which parameter or header is wrong)

Kind regards,
Domenic
Pavan
Joined: May 5, 2020
Messages: 3
Offline
Hi Dominic,

I agree that this is a problem on Presence 8.1.2, we will fix it up in next version.

Regards,
Pavan
dkalinasch
Joined: May 16, 2019
Messages: 35
Offline
Hello,

can someone estimate when a new version will be available or the problem will be fixed?

Kind regards,
Domenic
Go to:   
Mobile view