first commit
This commit is contained in:
25
main.py
Normal file
25
main.py
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
from pyconnectwise import ConnectWiseManageAPIClient
|
||||||
|
import os
|
||||||
|
from dotenv import load_dotenv
|
||||||
|
load_dotenv()
|
||||||
|
comp_id = os.getenv('comp_id')
|
||||||
|
client_id = os.getenv('client_id')
|
||||||
|
api_pub = os.getenv('api_pub')
|
||||||
|
api_priv = os.getenv('api_priv')
|
||||||
|
url_base = "portal.gotocompu.com"
|
||||||
|
print(comp_id,api_pub)
|
||||||
|
# init client
|
||||||
|
api_client = ConnectWiseManageAPIClient(
|
||||||
|
# your company name,
|
||||||
|
comp_id,
|
||||||
|
# manage instance url,
|
||||||
|
url_base,
|
||||||
|
# your api client id,
|
||||||
|
client_id,
|
||||||
|
# your api public key,
|
||||||
|
api_pub,
|
||||||
|
# your api private key,
|
||||||
|
api_priv,
|
||||||
|
)
|
||||||
|
companies = api_client.company.companies.get()
|
||||||
|
print(companies[10])
|
Reference in New Issue
Block a user