Skip to content

Instantly share code, notes, and snippets.

@Neumi
Last active August 1, 2020 17:34
Show Gist options
  • Save Neumi/bc1d30d23f511a63cdf71ccaff3b320c to your computer and use it in GitHub Desktop.
Save Neumi/bc1d30d23f511a63cdf71ccaff3b320c to your computer and use it in GitHub Desktop.
import requests
headers = {
'Accept': 'application/json',
'Authorization': 'key ttn-account-v2.not-a-real-key-blabla-booboo',
}
params = (
('last', '2d'),
)
response = requests.get('https://APPLICATION_NAME.data.thethingsnetwork.org/api/v2/query', headers=headers, params=params)
print(response.content())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment