Hello community,
I want to add data inside a section with the OData interface. I've already checked the documentation at https://documenter.getpostman.com/view/10204500/SztHX5Qb?version=latest and https://academy.creatio.com/docs/developer/integrations_and_api/data_se… but I have the following problem:
I am using a simple Python script to make the API requests in these steps:
1. Authenticate in the website using the Authentication method
This works nice using the credentials as payload inside the request.
2. Extract the cookie returned inside the header response.
From the test I've made, I need to extract the cookie parts UserName, BPMCSRF, .ASPXAUTH, BPMLOADER and append all of them inside a "Cookie" header like this example:
"Cookie: BPMLOADER=; UserType=General; UserName=; .ASPXAUTH=; BPMCSRF=;"
Everywhere I've checked inside the documentation it says that it is enough using a header called BPMCSRF with that value from the Set-Cookie response header, but in my case it fails using that value and I have to build the Cookie myself with the different values specified above.
3. Perform a POST request to a section like https://mycreatio.com/0/odata/Case
Here the request fails and I get an error 403 - Forbidden with the following message:
403 - Forbidden: Access is denied.
You do not have permission to view this directory or page using the credentials that you supplied.
And I don't understand why Creatio returns that error, because if I try doing a GET request to the same URL it returns the full list without any problem, but performing a POST request using the same cookie structure inside the headers doesn't return the expected inserted register.
Thanks in advance in for your help.
Regards.