chrismaddalena / Goreport

A Python script to collect campaign data from Gophish and generate a report
BSD 3-Clause "New" or "Revised" License
180 stars 50 forks source link

Invalid API key #5

Closed Anjdroid closed 7 years ago

Anjdroid commented 7 years ago

Hi,

my issue is that I keep getting the error: Details invalid API key when the GoReport tries to get the Data of the campaign. I have tried GoReport with two different GoPhish-es (both latest version), one was running directly on my computer and one was running on a server in the same domain and both times it cannot connect with the API key. I reset API key, reset the GoPhish server... not sure if im doing anything wrong or am I missing something?

chrismaddalena commented 7 years ago

Hey there,

That error is from the GoPhish server you are authenticating against. It means what it says, so my best guess is the config file might be pointing to a different server than the one that has that API key. You mentioned trying to different servers, so that could be the case.

Is the IP address in the gophish.config file the one tied to the API key also listed in there?

It really shouldn't matter, but I can't remember if I ever tested this to be sure, so make sure there are no extra characters at the beginning or end of the API key, too. Clear any whitespace and anything else you might find there.

Let me know if you have any luck.

Anjdroid commented 7 years ago

I fixed my problem, silly as it was. The configuration for the server was correct, but I put the api_key in brackets < > and thats why it didn't work. Sorry to have troubled you 🐙

chrismaddalena commented 7 years ago

Cool! No problem at all. I'm glad it was a simple fix. Tanks for letting me know!