<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Error while trying to import Meraki  __init__   raise APIKeyError() in Network Platform API</title>
    <link>https://community.cisco.com/t5/network-platform-api/error-while-trying-to-import-meraki-init-raise-apikeyerror/m-p/5443504#M6764</link>
    <description>&lt;P&gt;Thanks for the reply&lt;/P&gt;&lt;P&gt;However I get the same error&lt;/P&gt;&lt;P&gt;Code&lt;/P&gt;&lt;P&gt;pi_key='093b24e85df15a3e66f1fc359f4c48493eaa1b73' # Demo API Key&lt;BR /&gt;import meraki&lt;BR /&gt;dashboard = meraki.DashboardAPI()&lt;/P&gt;&lt;P&gt;File &lt;SPAN&gt;"C:\Users\Meraki\AppData\Local\Programs\Python\Python38\Lib\site-packages\meraki\__init__.py"&lt;/SPAN&gt;, line 61, in &lt;SPAN&gt;__init__&lt;/SPAN&gt;&lt;BR /&gt;  &lt;SPAN&gt;raise APIKeyError()&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;meraki.exceptions.APIKeyError: Meraki API key needs to be defined&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 09 Oct 2020 00:01:53 GMT</pubDate>
    <dc:creator>Virgil Wilson</dc:creator>
    <dc:date>2020-10-09T00:01:53Z</dc:date>
    <item>
      <title>Error while trying to import Meraki  __init__   raise APIKeyError()</title>
      <link>https://community.cisco.com/t5/network-platform-api/error-while-trying-to-import-meraki-init-raise-apikeyerror/m-p/5443501#M6761</link>
      <description>&lt;P&gt;I'm trying to import Meraki and get error of __init__ raise APIKeyError()&lt;/P&gt;&lt;P&gt;Here is the script I'm using&lt;/P&gt;&lt;P&gt;MERAKI_DASHBOARD_API_KEY='093b24e85df15a3e66f1fc359f4c48493eaa1b73' # Demo API Key&lt;BR /&gt;import meraki&lt;BR /&gt;dashboard = meraki.DashboardAPI()&lt;BR /&gt;my_orgs = dashboard.organizations.getOrganizations()&lt;/P&gt;&lt;P&gt;Here is where it fails &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;# Check API key&lt;BR /&gt;api_key = api_key or os.environ.get(API_KEY_ENVIRONMENT_VARIABLE)&lt;BR /&gt;if not api_key:&lt;BR /&gt;raise APIKeyError()&lt;/P&gt;&lt;P&gt;Here is the output&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;C:\Users\MerakiAppData\Local\Programs\Python\Python38\Lib\site-packages\meraki\__init__.py"&lt;/SPAN&gt;, line 61, in &lt;SPAN&gt;__init__&lt;/SPAN&gt;&lt;BR /&gt;  &lt;SPAN&gt;raise APIKeyError()&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;meraki.exceptions.APIKeyError: Meraki API key needs to be defined&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Any help would be apricated in advance.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Oct 2020 05:02:43 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/error-while-trying-to-import-meraki-init-raise-apikeyerror/m-p/5443501#M6761</guid>
      <dc:creator>Virgil Wilson</dc:creator>
      <dc:date>2020-10-07T05:02:43Z</dc:date>
    </item>
    <item>
      <title>Re: Error while trying to import Meraki  __init__   raise APIKeyError()</title>
      <link>https://community.cisco.com/t5/network-platform-api/error-while-trying-to-import-meraki-init-raise-apikeyerror/m-p/5443502#M6762</link>
      <description>&lt;P&gt;Correction to my post&lt;/P&gt;&lt;P&gt;I ran each line into the python console and it isn't failing in the import Meraki.  It is failing when it calls dashboard = meraki.DashboardAPI()&lt;/P&gt;</description>
      <pubDate>Wed, 07 Oct 2020 05:40:10 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/error-while-trying-to-import-meraki-init-raise-apikeyerror/m-p/5443502#M6762</guid>
      <dc:creator>Virgil Wilson</dc:creator>
      <dc:date>2020-10-07T05:40:10Z</dc:date>
    </item>
    <item>
      <title>Re: Error while trying to import Meraki  __init__   raise APIKeyError()</title>
      <link>https://community.cisco.com/t5/network-platform-api/error-while-trying-to-import-meraki-init-raise-apikeyerror/m-p/5443503#M6763</link>
      <description>&lt;P&gt;MERAKI_DASHBOARD_API_KEY='093b24e85df15a3e66f1fc359f4c48493eaa1b73' # Demo API Key&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;api_key = api_key or os.environ.get(API_KEY_ENVIRONMENT_VARIABLE)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You have defined a variable called MERAKI_DASHBOARD_API_KEY and then referenced api_key.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You could perhaps use:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;api_key = MERAKI_DASHBOARD_API_KEY or os.environ.get(API_KEY_ENVIRONMENT_VARIABLE)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;or:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;api_key = 093b24e85df15a3e66f1fc359f4c48493eaa1b73'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;instead of using MERAKI_DASHBOARD_API_KEY.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Oct 2020 20:38:04 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/error-while-trying-to-import-meraki-init-raise-apikeyerror/m-p/5443503#M6763</guid>
      <dc:creator>Philip D'Ath</dc:creator>
      <dc:date>2020-10-07T20:38:04Z</dc:date>
    </item>
    <item>
      <title>Re: Error while trying to import Meraki  __init__   raise APIKeyError()</title>
      <link>https://community.cisco.com/t5/network-platform-api/error-while-trying-to-import-meraki-init-raise-apikeyerror/m-p/5443504#M6764</link>
      <description>&lt;P&gt;Thanks for the reply&lt;/P&gt;&lt;P&gt;However I get the same error&lt;/P&gt;&lt;P&gt;Code&lt;/P&gt;&lt;P&gt;pi_key='093b24e85df15a3e66f1fc359f4c48493eaa1b73' # Demo API Key&lt;BR /&gt;import meraki&lt;BR /&gt;dashboard = meraki.DashboardAPI()&lt;/P&gt;&lt;P&gt;File &lt;SPAN&gt;"C:\Users\Meraki\AppData\Local\Programs\Python\Python38\Lib\site-packages\meraki\__init__.py"&lt;/SPAN&gt;, line 61, in &lt;SPAN&gt;__init__&lt;/SPAN&gt;&lt;BR /&gt;  &lt;SPAN&gt;raise APIKeyError()&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;meraki.exceptions.APIKeyError: Meraki API key needs to be defined&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Oct 2020 00:01:53 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/error-while-trying-to-import-meraki-init-raise-apikeyerror/m-p/5443504#M6764</guid>
      <dc:creator>Virgil Wilson</dc:creator>
      <dc:date>2020-10-09T00:01:53Z</dc:date>
    </item>
    <item>
      <title>Re: Error while trying to import Meraki  __init__   raise APIKeyError()</title>
      <link>https://community.cisco.com/t5/network-platform-api/error-while-trying-to-import-meraki-init-raise-apikeyerror/m-p/5443505#M6765</link>
      <description>&lt;P&gt;I figured out what the problem was.  I wasn't passing the api_key into the argument.&lt;/P&gt;&lt;P&gt;dashboard = meraki.DashboardAPI&lt;STRONG&gt;()&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;should have been dashboard = meraki.DashboardAPI&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;(api_key)&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Oct 2020 00:46:45 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/error-while-trying-to-import-meraki-init-raise-apikeyerror/m-p/5443505#M6765</guid>
      <dc:creator>Virgil Wilson</dc:creator>
      <dc:date>2020-10-09T00:46:45Z</dc:date>
    </item>
  </channel>
</rss>

