GenieACS getting Invalid Session Error from EasyCWMP

Hello everyone
I have EasyCWMP and GenieACS installed in a Ubuntu Virtual Machine. They are sending regular Inform request and Inform Responses between each other.
I am trying to send curl commands to use any get or set functions from GenieACS to the CWMP, and I keep getting the Invalid Session error.

curl -u easycwmp:easycwmp -i ‘http://localhost:7547/devices/FFFFFF-easycwmp-FFFFFF123456/tasks’ -X POST -H ‘Content-Type: application/json’ -d ‘{ “name”: “getParameterValues”, “parameterNames”: [“Device.DeviceInfo.SpecVersion”]}’
HTTP/1.1 400 Bad Request
Content-Length: 15
Connection: close
Date: Tue, 06 Jun 2023 12:01:41 GMT

Invalid session

Any suggestions?

Are you doing this from the application?

Normally a normal communication should be from acs to initiate a connection request which will trigger the device to also send a connection request. Then your get or set should work.

Sorry for the late reply. But I fixed the silly error. I was using the CWMP port 7547 instead of the NBI port 7557 to send requests, which was causing the error. Helpful for anyone using curl commands instead of the GUI in the browser.