Skip to content
This repository has been archived by the owner on Sep 24, 2024. It is now read-only.

http 403 #25

Open
glow995 opened this issue Aug 1, 2019 · 9 comments
Open

http 403 #25

glow995 opened this issue Aug 1, 2019 · 9 comments

Comments

@glow995
Copy link

glow995 commented Aug 1, 2019

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
Copy link

hdrkhls commented Sep 5, 2019

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
Copy link
Contributor

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
Copy link

hdrkhls commented Sep 6, 2019

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
Copy link

Ziggista commented Sep 6, 2019

@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
Copy link

hdrkhls commented Sep 6, 2019

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

@Ziggista
Copy link

Ziggista commented Sep 6, 2019

@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
Copy link

hdrkhls commented Sep 6, 2019

image
that's my output in powershell

@Ziggista
Copy link

Ziggista commented Sep 6, 2019

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

@KochsPet
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants