Hexnode MDM API returns "Invalid token" after API key resetSolved

Participant
Discussion
5 days ago Jul 16, 2026

We reset our Hexnode API key and started getting this response when calling the Hexnode REST API:

{"detail":"Invalid token."}

The API key is enabled under Admin > API. The same automation was working with the previous key. We were testing with a header like this:

Authorization: token

We also tried Basic authentication, but it failed with the same invalid token response. This is for managing Windows devices programmatically, including checking enrollment details and triggering device lifecycle actions. What is the correct authentication format for the Hexnode API after resetting the key?

Replies (1)

Marked SolutionPending Review
Hexnode Expert
5 days ago Jul 16, 2026
Marked SolutionPending Review

Hi @mike_johnson ,

For Hexnode API requests, use the API key directly in the Authorization header. Do not prefix it with token.

Instead of:

Authorization: token <api_key>

use:

Authorization: <api_key>

For endpoints that require a JSON payload, also include the content type header. For example:


If the API key was recently reset, make sure the new key is copied exactly from the Hexnode portal and that the old key is no longer being used in your automation scripts.

Best Regards,
Isabel Lora
hexnode UEM

Save