You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

16 lines
659 B

import requests
key = "NNSXS.HW322AUYDYJ5MXOJFTAQTMEJ3JY4FTY5YIQUJ2Y.BSMRHHPEQTUVLPFSAQOVGFKUNBZU7EIZMBKCLIQPVRKCP72GLLZQ"
id_divice = "eui-60c5a8fffe79898c"
application = "prueba-cukla-01"
headers = {"Authorization":"Bearer NNSXS.HW322AUYDYJ5MXOJFTAQTMEJ3JY4FTY5YIQUJ2Y.BSMRHHPEQTUVLPFSAQOVGFKUNBZU7EIZMBKCLIQPVRKCP72GLLZQ",
"User-Agent":""
}
url_endp = f'https://nam1.cloud.thethings.network/api/v3/applications/{application}/divices/{divice}?field_mask=name,description'
url2_endp = "https://nam1.cloud.thethings.network/api/v3/applications/prueba-cukla-01/devices"
resp = requests.get(url2_endp,headers=headers)
print(resp.text)