I apologize in advance for such a basic question. I've tried using the Insightly for Python github repo. The sample code is:
from insightly import Insightly
i = Insightly(apikey=my_api_key)
I tried this with my apikey and got a 401 error. IT verified that the account they gave me the API key for has all necessary permissions.
I also tried using python requests. The documentation says "The API key needs to be included as the Base64-encoded username, leaving the password blank."
My code is:
import requests
r = requests.get('https://api.na1.insightly.com/v3.1/Contacts',auth=(my_api_key,''))
and this as well got a 401 error.
Is there a better way to access the Insightly API using python?