Receiving 403 Forbidden Error
Receiving 403 Forbidden
Add your rating:----------Description: I am experiencing a 403 Forbidden ,error when trying to access endpoints of the KACE API. I am able to generate the jwt token by using this url https://url/ams/shared/api/security/login , and after this i am also able to authenticate for 2Fa authentication method , with the url: https://url/ams/shared/api/security/verify_2factor. Although, I am able to fetch data for some other api's , only for selective api's i am facing this 403 error code and unauthorised error. When i am trying to fetch data using other api's like :
-->https://url/api/inventory/processes
-->https://url/api/asset/assets
-->https://url/api/inventory/services
I receive 403 Forbidden error code. I don't understand why is that the so, because i am using the exact same headers, params and body in all the api's. Then how is it possible that i am facing the unauthorised error in selective api's.
- Error Received: 403 Forbidden
- Response Body:{ "errorCode": -1, "errorDescription": "Unauthorized"}
- API Endpoint: Mentioned above.
- Authentication Method: JWT token
- KACE Version: 13.2.182
Answers (3)
I verified that the following API calls work on 13.2.
-->http://url/api/users/users
-->http://url/api/inventory/processes
-->http://url/api/asset/assets
-->http://url/api/inventory/services
You may want to set up a dev SMA without 2FA to retest. Use the SMA admin user while testing.
If you still have an issue, put your API calls into a Postman collection and post the exported JSON file.
Hey, actually I am doing this testing on a production environment, so I cannot set up a Dev SMA without 2FA to test. Can u share the body , headers , Params and authorisation you are using to test these in postman .
Also is it a possibility that I am facing this error because in the production setup we might require additional permissions to access information related to these specific api’s ????
Comments:
-
Your SMA license allows you to set up a dev SMA (non-production)
I used the admin user during my testing - KevinG 3 months ago
Sure I will have a look regarding this non-production setup.
I am using a read-only administrator for this , but I don’t think that’s the problem bcoz I am not facing this error with other Api’s , only with these 2-3 specific api’s .
In addition to that can u suggest me some api’s to fetch data of all the assets , the total number of assets , etc .