Trying to perform an API on the Meraki network. My code works on my local machine but on the server, I get an error.
Here is the top portion of my code:
starttime = time.time()
dashboard = meraki.DashboardAPI(
api_key=API_KEY,
output_log=True)
# Get list of organizations to which API key has access
organizations = dashboard.organizations.getOrganizations()
It is the organizations line of code that is throwing the following error.
organizations = dashboard.organizations.getOrganizations()
2022-05-23 08:30:56 meraki: WARNING > organizations, getOrganizations - HTTPSConnectionPool(host='api.meraki.com', port=443): Max retries exceeded with url: /api/v1/organizations (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')],)",),)), retrying in 1 second
2022-05-23 08:30:57 meraki: WARNING > organizations, getOrganizations - HTTPSConnectionPool(host='api.meraki.com', port=443): Max retries exceeded with url: /api/v1/organizations (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')],)",),)), retrying in 1 second
Traceback (most recent call last):
File "<ipython-input-4-2ae5f28e1df9>", line 1, in <module>
organizations = dashboard.organizations.getOrganizations()
File "C:\ProgramData\Anaconda3\lib\site-packages\meraki\api\organizations.py", line 21, in getOrganizations
return self._session.get(metadata, resource)
File "C:\ProgramData\Anaconda3\lib\site-packages\meraki\rest_session.py", line 283, in get
response = self.request(metadata, 'GET', url, params=params)
File "C:\ProgramData\Anaconda3\lib\site-packages\meraki\rest_session.py", line 187, in request
raise APIError(metadata, response)
APIError: organizations, getOrganizations - None None, None
Any help on how to correct this issue would be greatly appreciated.