Important!!! Cookies in System

Hi Support,

I’m working on a business process that involves calling custom web services. For authentication, I need to pass cookies such as BPMLOADER, .ASPXAUTH, and BPMCSRF in the header. Currently, I'm adding these manually, which isn't practical.

image


Query: Is there a way to automatically fetch these cookies when a user logs into Creatio and store them in a variable for later use in a web-service call? 


Platform: Creatio:Energy (Freedom UI)

Like 0

Like

2 comments

If the web services are native to Creatio, why call them as web services at all? That adds a lot of unnecessary overhead to doing something that is already native. It would be better to rethink the approach. Can you give more details of what specifically you're trying to accomplish?

Based on my understanding, to make any API call whether it is OData Service or Custom Web-Service, we need to pass Cookies in header for 'GET' request & BPMCSRF Token along with Cookies for 'POST' Request as authentication.

ServiceName: Get Object Detail

Authentication: Basic Auth
Web Service with Basic Authentication


In Below Example, I'm trying to fetch all city data using 'City' Object. (checked 'use authentication')

Case_1. No Cookies in Header, we get error as below: 



Error

Case_2: Passing Cookies in Header.

City Response

 

Also in Postman, Cookies are automatically fetched in Header

City Response with Cookies in Header

Query

1. We’ve created some custom web services (C#) in Creatio to pull data from a client’s external database. To automate this:

  • We plan to schedule these service calls to run at fixed intervals.
  • These scheduled jobs will include logic to authenticate with Creatio, store and reuse cookies, and execute the service calls with proper headers.

2. To fetch Creatio's Object (Data-Item) detail through web-service.

 

 

 

Show all comments