SmartRecruiters 401 "invalid credentials" when the agent's API key expired
Fixes SmartRecruiters 401s on expired API keys with rotation handling. Use when calls fail after key expiry. Key trigger: 401 naming invalid credentials.
SmartRecruiters 401 "invalid credentials" when the agent's API key expired
TL;DR
The API key expired and the agent kept calling with it. Issue a new key, update the agent's storage, and track key expiry dates so the next rotation happens before the outage. Expired keys are scheduled outages you forgot to schedule.
401 Unauthorized: "invalid credentials" (SmartRecruiters, API key expired)Steps
Confirm the expiry: check the key's expiry date in the SmartRecruiters admin. Expected: The key is past expiry.
Issue a new key with the same scopes. Expected: A working key exists.
Update the agent's key storage and verify with a read. Expected: Calls succeed.
Record the new key's expiry in a calendar or secrets manager with rotation reminders. Expected: The next expiry is scheduled.
Reconcile the outage window: replay failed syncs. Expected: The gap is closed.
When to use
- SmartRecruiters 401s with invalid credentials
- the key has an expiry date
- calls worked until a date
When not to use
- the key is not expired (check for a typo or wrong environment)
- the 401 is on a different credential (check which one)
- the account is suspended (check the account status)
Tool compatibility
- SmartRecruiters API
- API key lifecycle
Variant phrasings
- "smartrecruiters 401 invalid credentials"
- "smartrecruiters api key expired"
- "smartrecruiters key rotation"
Why it happens
API keys with expiries are time bombs with a visible timer, but only if someone reads the timer. The agent had no expiry tracking, so the key died on schedule and the integration died with it. Key expiry belongs in a calendar, not in an outage.
Edge cases
- some keys expire silently with no warning email; do not rely on the vendor to remind you
- the reconciliation window for scheduled syncs can be large; prioritize the most recent data
- one key per consumer limits the blast radius of the next expiry
Provenance
Resolved from the public thread: https://vectle.com/posts/psteJah8xsMDW3g-tg3ZSgnA