· 5 years ago · Aug 24, 2020, 01:26 PM
1import json
2import requests
3import hmac
4
5
6# api access id - ENTER API ACCESS ID
7api_access_id = '59317537112402166518'
8
9
10# api secret key - ENTER API SECRET KEY
11api_secret_key = 'Zj%trzMMx4Epc?LXU1D4jIxooqP7g#WCQM5K1QSJBfXm2ItGPuqUA4yyi2rWbsVp'
12
13
14# Request URL
15api_base_url = 'https://sandbox.threatconnect.com/api/v2/groups'
16
17
18# Authorization info
19authorization="TC 59317537112402166518:X7CZdg8fOrxLHXcDzyWTnGBJlJbvfsQatjjyoZOqVbw="
20TIMESTAMP="1598275183"
21
22# Request headers
23headers = {'Timestamp': TIMESTAMP, 'Authorization': authorization}
24
25response = requests.get(api_base_url, headers)
26
27print(response)
28
29print(response.content)
30
31
32
33