Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't pass API key for user scripts #19

Open
amr-cossi opened this issue Feb 14, 2020 · 0 comments
Open

Can't pass API key for user scripts #19

amr-cossi opened this issue Feb 14, 2020 · 0 comments
Labels

Comments

@amr-cossi
Copy link

Describe the bug

Since the migration of the config reading methods, the simplest example is broken and the api key can't be declared inside a python script any more.

Expected behavior

Take into account the AutoFocusAPI.api_key value

from autofocus import AFSample, AFConnectionActivity, AFUserAgentFragment, AFRelatedMacro, AutoFocusAPI
AutoFocusAPI.api_key='__REMOVED__'
AFSample.get("8404e06ff383275462298e830bebe9540fab2092eca5523649d74e6e596ac23d")

Current behavior

Error :

API key is not set. Library requires AutoFocusAPI.api_key to be set, or apikey"
autofocus.exceptions.ClientError: (ClientError(...), 'API key is not set. Library requires AutoFocusAPI.api_key to be set, or apikeyto be provided via configuration file.

Steps to reproduce

See code above.

Context

It breaks the TheHive/Cortex integration recently merged in the main repository of connectors :
TheHive-Project/Cortex-Analyzers#473

Your Environment

  • Last working version: 3.0.1
  • Version broken: 4+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant