marksman icon indicating copy to clipboard operation
marksman copied to clipboard

http 403

Open glow995 opened this issue 5 years ago • 9 comments

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 <appSettings> 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."

glow995 avatar Aug 01 '19 06:08 glow995

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

hdrkhls avatar Sep 05 '19 10:09 hdrkhls

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.

danielhogg avatar Sep 05 '19 13:09 danielhogg

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

hdrkhls avatar Sep 06 '19 00:09 hdrkhls

@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"

Ziggista avatar Sep 06 '19 05:09 Ziggista

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

hdrkhls avatar Sep 06 '19 07:09 hdrkhls

@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

Ziggista avatar Sep 06 '19 07:09 Ziggista

image that's my output in powershell

hdrkhls avatar Sep 06 '19 07:09 hdrkhls

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

Ziggista avatar Sep 06 '19 07:09 Ziggista

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

KochsPet avatar Jan 20 '20 08:01 KochsPet