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

Invalid API Key #6

Open
calex12 opened this issue Oct 9, 2024 · 0 comments
Open

Invalid API Key #6

calex12 opened this issue Oct 9, 2024 · 0 comments

Comments

@calex12
Copy link

calex12 commented Oct 9, 2024

I am trying to use ffufai with my GitHub API key obtained from a Personal Access Token, but I am encountering an error when I run the following command:
ffufai -u http://myweb/FUZZ
ERROR


Traceback (most recent call last):
  File "/usr/local/bin/ffufai", line 115, in <module>
    main()
  File "/usr/local/bin/ffufai", line 103, in main
    extensions_data = get_ai_extensions(url, headers, api_type, api_key, args.max_extensions)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/bin/ffufai", line 67, in get_ai_extensions
    message = client.messages.create(
              ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/anthropic/_utils/_utils.py", line 274, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/anthropic/resources/messages.py", line 885, in create
    return self._post(
           ^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/anthropic/_base_client.py", line 1277, in post
    return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/anthropic/_base_client.py", line 954, in request
    return self._request(
           ^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/anthropic/_base_client.py", line 1058, in _request
    raise self._make_status_error_from_response(err.response) from None
anthropic.AuthenticationError: Error code: 401 - {'type': 'error', 'error': {'type': 'authentication_error', 'message': 'invalid x-api-key'}}```

------------------------------------------------------
Steps Taken:

1. I generated my API key from GitHub by creating a Personal Access Token with the necessary scopes.
2. I ensured that the URL is correct and accessible.
3. I have verified that the token has the appropriate permissions for the actions I am trying to perform.

Could you please assist me in troubleshooting this issue? Any guidance on what might be causing this error or steps to resolve it would be greatly appreciated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant