Scope-IT / marksman

Windows agent for Snipe-IT asset management system
Apache License 2.0
129 stars 23 forks source link

http 403 #25

Open glow995 opened 5 years ago

glow995 commented 5 years ago

After trying to run the marksman I get the below error, not sure where the problem is. The API key was created from the SnipeIT user's "ManageAPIKeys"

"C:\Program Files (x86)\Scope-IT\Marksman>Marksman 1/8/2019 12:32:52 PM: Started application. HTTP 403: Unauthorized. Please check the API key value in your block of the Marksman config file and ensure it has been set to a valid key. ERROR: Could not connect to SnipeIT database instance. Total program execution time 1522ms. 1/8/2019 12:32:53 PM: Exiting application."

hdrkhls commented 5 years ago

I get the same problem,

I've generated the API code with the command "php artisan passport:client --personal", and I've set it in the marksman.exe.config config file, and when i started the marksman i got the same error, maybe someone can help me to, thanks

danielhogg commented 5 years ago

I am unfamiliar with Laraval's API system using artisan, and I am not sure if it is compatible.

Can you try creating an API key manually in your SnipeIT dashboard? In the settings in the top right, there should be a button called 'Manage API Keys'. Try generating an API key this way, and then put it into your config file.

hdrkhls commented 5 years ago

I've tried it, and have set it on the config file but when i started marksman i got the same error image image that's the API code right ?, i set that on my config file image

and when i run the marksman, i still get the same error

image

Ziggista commented 5 years ago

@hdrkhls I believe that your missing a "/api/v1" from the ned of your BaseURI value field. It should look like "http://192.100.100.191/api/v1"

hdrkhls commented 5 years ago

@Ziggista thanks, but now i get this massage image that's work or not ?

Ziggista commented 5 years ago

@hdrkhls Looks like your getting further than you were before. The error points towards the Manufacturer been null. What is the output of get-wmiobject -Query "SELECT * FROM Win32_ComputerSystem" in Powershell?

image

hdrkhls commented 5 years ago

image that's my output in powershell

Ziggista commented 5 years ago

@hdrkhls see issue #9 This is the same error. What happens when you download and install the latest release?

KochsPet commented 4 years ago

Hi there, I have the same error as described above. I created the API key in the web interface and in the shell. Both fail. I don't find the mistake. The BaseURI appears to be correct.

grafik