Open zm1868179 opened 3 years ago
š Thanks for opening your first issue here! If you're reporting a š bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.
Thought I would give an update here is from the error log:
[2020-12-10 00:11:29] production.ERROR: The resource owner or authorization server denied the request. {"exception":"[object] (League\OAuth2\Server\Exception\OAuthServerException(code: 9): The resource owner or authorization server denied the request. at C:\inetpub\wwwroot\snipit\vendor\league\oauth2-server\src\Exception\OAuthServerException.php:243) [stacktrace]
"}
Please confirm you have done the following before posting your bug report: I have enabled debug mode I have read checked the Common Issues page Not able to use any API method all method return Unauthorized
To Reproduce Steps to reproduce the behavior: attempted to use Postman and PowerShell to test API with only performing a get request against any API method
User token is generated with a Super Admin user and have attempted other tokens from other users Attempted to grant all perms including super admin and still get unauthorized. Have reinstalled Snipe IT 2 times and still get the same results
Postman
Powershell: $APIkey = SECRECT-KEY $url = "https://SERVERNAME" $Uri = "$url/api/v1/users" $_headers = @{ "Accept" = "application/json" 'Content-Type' = 'application/json' 'Authorization' = "Bearer $apikey"
Invoke-RestMethod -Method Get -Uri $Uri -Header $_headers
Response : Unauthorized
Expected behavior recieve Hardware list or users etc
Server (please complete the following information):
Snipe-IT Version v5.0.11 - build 5695 (master) OS: Windows Server 2019 Web Server: IIS PHP Version PHP 7.4.13 Desktop (please complete the following information):
OS: Windows 10 Enterprise Browser Microsoft Edge Version 87