0

Currently we are trying to forward data from SigFox device to cumulocity by configuring a Callback from the SigFox admin panel but we always receive a 400 – Bad Request HTTP response.

enter image description here

  • If I change the URL to forward on requestBin, there is no problem, I got a 200 HTTP status code.
  • If I use Postman to send the request with the same header params and same body it works too. enter image description here

Do you know what can be the issue?

Moreover, can you tell us what is the best way to manage the mapping between SigFox Device Ids and Cumulocity ones? Callbacks are created for a group of device in SigFox, so we can’t hardcode the Cumulocity Id as “source” in the body of the each request. Maybe it’s possible to use the Identity API to register the mapping between SigFox Device Id and the Cumulocity device Id? I thought it would be possible to write a Processing task in CEL to listen the EventCreated in order to extract the SigFox Id from the received object and query the database to get the internal Id given the external Id with one of your pre-defined functions found here http://www.cumulocity.com/guides/reference/cumulocity-event-language/

But there is no function to query the Identity documents. So if you have already solved this specific use case, can you please give us the best approach?

  • I'm not sure but maybe it's the `Content-type`. Can you try `application/vnd.com.nsn.cumulocity.event+json`? `application/json` and UTF-8 don't play along well in my experience. – mostruash Feb 23 '16 at 13:47
  • In fact we can't set this Content-Type. SigFox only permits to set application/json or application/x-www-form-urlencoded. But I tried to set the same Content-Type: application/json with Postman and it works. – Thomas Lallement Feb 23 '16 at 14:55
  • Moreover, SigFox admin panel doesn't allow to provide specific Accept-* parameter in headers. So there is no way to provide another configuration here. But I also tried to provide the exact same header properties with Postman and it works well. – Thomas Lallement Feb 23 '16 at 15:02
  • @ThomasLallement I don't know what the situation was in 2016, but wouldn't it nowadays be easier to use the [sigfox interface on cumulocity](https://www.cumulocity.com/guides/users-guide/optional-services/#sigfox)? – Ivo Merchiers May 31 '19 at 06:33

0 Answers0