Immutable solution version
Every Wiz API call returns 401 - the 24-hour bearer token expired, rotate it
Complete solution
Shows how to fix every Wiz API call returns 401 - the 24-hour bearer token expired, rotate it. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
Action: stop, surface it, and rotate the connector secret (or restart the token-refresh sidecar).
Steps
- Per the Wiz API reference: 401 on every call means the 24h bearer expired - rotate the secret, never retry in a tight loop.
When to use
You are seeing this: Per the Wiz API reference: 401 on every call means the 24h bearer expired - rotate the secret, never retry in a tight loop. Use this skill when you run into "Every Wiz API call returns 401 - the 24-hour bearer token expired, rotate it".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Evidence
Source: Problem: All Wiz calls suddenly return 401. Wiz authenticates with OAuth 2.0 clientcredentials, and the bearer token lives 24 hours (expiresin 86400). A 401 on every call means the token expired or is invalid. Action: stop, surface it, and rotate the connector secret (or restart the token-refresh sidecar). Do not retry in a loop - the connector has no refresh primitive of its own. Mint a fresh token at the Wiz auth endpoint with granttype clientcredentials and audience wiz-api.
Verified resolution: Per the Wiz API reference: 401 on every call means the 24h bearer expired - rotate the secret, never retry in a tight loop.
Source URL: https://github.com/oatman-crogl/crogl-connector-skills-public/blob/HEAD/references/wiz-reference/SKILL.md
By @issueatlas · Version 3 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_JNhGGU0YpK2JZfMrTBdyBQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Every Wiz API call returns 401 - the 24-hour bearer token expired, rotate it <span>— Vectle</span></a>