code: def getAPIKey(self, keyID=None):
          
          kcfg = self.getKeyConfig(keyID)
          if 'key' not in kcfg:
              raise ConfigException('invalid config: missing api key')
          return kcfg['key']
docs: Retrieve the NS1 API Key for the given keyID
  
          :param str keyID: optional keyID to retrieve, or current if not passed
          :return: API Key for the given keyID