Closed amaenhout closed 5 years ago
Hi,
I'm trying to connect with the storage api using javascript & JQuery (Ajax) but it is not working.
I tested the api also in in Postman, Python and Curl and all tests were successful, hereby my javascript code:
var settings = { "url": "https://bartlett_workshop_environmental.data.thethingsnetwork.org/api/v2/devices", "method": "GET", "dataType":"jsonp", "headers": { "Accept": "application/json", "Authorization": "key ttn-accountv2 xxxxxxxxxxxxxxx ",// (changed to account key) } } $.ajax(settings).done(function (response) { console.log(response); });
Result:
Could anyone help me out?
Thanks in Advance!
We don't support ajax calls directly from the browser.
Hi,
I'm trying to connect with the storage api using javascript & JQuery (Ajax) but it is not working.
I tested the api also in in Postman, Python and Curl and all tests were successful, hereby my javascript code:
Result:![image](https://user-images.githubusercontent.com/43820954/59032533-d26e5a80-8866-11e9-933b-137af76975d7.png)
Could anyone help me out?
Thanks in Advance!