gophish / api-client-python

A Python API Client for Gophish
MIT License
45 stars 48 forks source link

{ "message": "API Key not set", "success": false, "data": null } #35

Open ghost opened 1 year ago

ghost commented 1 year ago

Sending Profile Not working - Says API key Not Set

HappyEarthDay commented 1 month ago

Same issue here. Passing the api_key in the headers, and getting { "message": "API Key not set", "success": false, "data": null }

EDIT: I found the issue. The documentation is not very clear on how to format the API key in the headers, but it's clear for URI-based API keys. I'd recommend just adding a quick example to GitBook for header-based authentication like: 'Authorization' = "Bearer $goPhishApiKey" or an example with curl + header authentication