Skip to content

Invalid API Key #6

Description

@calex12

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions