Hexnode API returns 401 Unauthorized during trial when using API keySolved

Participant
Discussion
18 hours ago Jul 12, 2026

I’m using a Hexnode trial and trying to test the API. I found the API key under Admin > API, but I couldn’t find any separate button to enable API access, even though some documentation seemed to suggest there might be one. When I try API calls, I keep getting 401 Unauthorized. I tried a few formats, including Basic Auth with email:API key, a token-style header, and Base64 encoding the key in PowerShell, but none of them worked. Is API access restricted on trial accounts, or is there another activation step needed before the API key can be used?

Replies (2)

Marked SolutionPending Review
Hexnode Expert
15 hours ago Jul 12, 2026
Marked SolutionPending Review

API access is available on all Hexnode plans, including trial accounts. There is no separate enable button or additional activation step required.

To use the API, copy the API key from Admin > API and pass it directly in the Authorization header. The 401 Unauthorized response usually occurs when the API key is sent in an unsupported format. Hexnode API authentication does not use:

  • HTTP Basic Authentication
  • email:API key format
  • Bearer token prefix
  • Base64-encoded values

Use the raw, unencoded API key exactly as copied from the portal. Example using curl:

 

Example using PowerShell:

Replace YOUR_HEXNODE_API_KEY with the actual API key from Admin > API, without adding any prefixes or encoding.

Marked SolutionPending Review
Participant
6 hours ago Jul 13, 2026
Marked SolutionPending Review

That explains it. I was encoding the key and also tried using email:api_key like Basic Auth. Passing the copied key directly in the Authorization header worked.

Save