Quantcast
Channel: MultiTech Developer Resources » All Posts
Viewing all articles
Browse latest Browse all 7111

JSON structure to register device with LNS

$
0
0

Hi,

I am trying to register a device with LNS via API call and passing json string to it.

The json structure that I am passing is:
{“deveui”:”0004A30B00EAC118″,”device_profile_id”:0,”network_profile_id”:1,”name”:”",”serial_number”:”",”product_id”:”",”hardware_version”:”",”firmware_version”:”"}

And the HTTP url format is:

https://aep.example.com/api/lora/devices?token=BA2DC9A581486BD849B4E8A85A689F83

When I use the above URL and JSON structure in POSTMAN I get following error:
“Invalid json device configuration, object expected”

When I use JSON structure from a C# program it registers the device but sometimes it throws exception:
Error:The remote server returned an error: (400) Bad Request.

So I am not able to understand what is wrong with the JSON structure and why it throws exception sometimes but registers the device every time?

I am struggling to get this working. Any help in this part is highly appreciated!

Regards,
Ajay


Viewing all articles
Browse latest Browse all 7111

Trending Articles