Sending downlink through API - error - invalid character 's' looking for beginning of value


I am trying to use the API to send the downlink to the field devices. I first tried to send the downlink through the application interface screen : Applicaiton / AppName / Devices / DevName -> “Enqueue downlink paylod” using port = 2 and entering base64string and it works perfectly fine.
So all components / set up working just fine.

But using API, I get an error:

Here is command:

curl -X POST --header ‘Content-Type: application/json’ --header ‘Accept: application/json’ --header 'Grpc-Metadata-Authorization: Bearer JWT-TOKEN ’ -d ‘{ \
“deviceQueueItem”: { \
“confirmed”: true, \
“data”: “K1VDTFZMVjAw”, \
“devEUI”: “devEUI-inHex”, \
“fCnt”: 4, \
“fPort”: 2, \
“jsonObject”: “string” \
} \
}’ ‘http://xxx.xx.xx.xx:8080/api/devices/devEUI-inHex/queue


“error”: “invalid character ‘s’ looking for beginning of value”,
“message”: “invalid character ‘s’ looking for beginning of value”,
“code”: 2,
“details”: []

Would anyone help me please…


If you’re sending data as base64, I don’t think you need jsonObject:

jsonObject (string, optional):

JSON object (string). Only use this when an application codec has been configured that can convert this object into binary form. 

Hi @bconway
Thank you so much for your quick reply!! That works perfectly!! You rock!!
Thanks again :slight_smile:

1 Like