Not able to send event to the device

We are trying to send an event to the device using the Cloud API with below curl command. But, device never receives the event even though event shows up in the Particle Console Log window. Below curl command is the script equivalent of what we are doing in java.

curl -X POST -H "Content-Type: application/x-www-form-urlencoded" -d 'name=35004b001551353531343431/hook-response/getDeviceData&data=Piggy_753872ee-bd6f-422e-a644-ec962a0fa387,1982200,100000,1982200,-10000,true&ttl=60&access_token=<client-access-token>' "<product-id>/events"

I can see the event in the Particle Log on the Product page. But, the function registered in the firmware on this event is not getting called.
But, if we use this as the response for a web hook, we can receive the event callback in the firmware.

Can someone identify what we are doing wrong?

are you subscribing to the event as PRIVATE or PUBLIC?


To clarify, have you got MY_DEVICES specified in your Particle.subscribe() statement or not?
And another point to check, when (or where in your code) do you call Particle.subscribe()?
You should do this as as possible in setup()

Not really since we can’t see your code which is most likely where the problem sits.