API call is showing 403 error message

expand collapsive

Hi, I’m fairly new to APIs but we would like to integrate Hexnode functions in a customized setup so I was trying out some APIs using the commands from Hexnode API documentation. We’re trying to fetch device details using GET https://.hexnodemdm.com/api/v1/devices/{DEVICE_ID}/

and the device ID used is correct but we keep getting 403 error messages. It returns some message like – Authentication credentials were not provided.

Can someone tell me what can we do to fix this issue?

All Replies

  • Like @muhammed mentioned, you might have missed the Authentication key while initiating the request. HTTP 403 error code is returned when access to the requested resource is forbidden. In your case, the key required to authenticate the request is missing; the other reasons to get this error code could be an invalid key or an unsupported Hexnode UEM plan.

    If you’re using Postman, you can add the Authorization key by going to the Authorization sub-tab and selecting the Authentication Type as API Key. Now, go to the Admin tab on your portal and find your API key under the API sub-tab. You can copy the code from there and paste it on the Postman app. The configuration on the Postman side under Authorization should be as –

    Key: Authorization

    Value: {Your API key}

    Add to: Header

    Next time you try the API request, the 403 shouldn’t appear if the API key you provided is correct.

    Zach Goodman
    Hexnode UEM