16 lines
412 B
Python
16 lines
412 B
Python
|
|
import sys
|
||
|
|
sys.path.insert(0, "./API_Tests/")
|
||
|
|
import requests
|
||
|
|
import Apikeys
|
||
|
|
apikey = Apikeys.G2
|
||
|
|
|
||
|
|
url = "https://api.northpass.com/v2/email_domains"
|
||
|
|
header = { "x-api-key": apikey, "Content-Type": "application/json" }
|
||
|
|
payload = {"domain": "g2.com", "custom_dkim_selector": "n"}
|
||
|
|
|
||
|
|
response = requests.post(url, headers=header, json=payload)
|
||
|
|
|
||
|
|
print(response.json())
|
||
|
|
print(response.text)
|
||
|
|
print(response.status_code)
|