Repository navigation
feat(zendesk): authenticate with an OAuth client instead of the API token - #86
Merged
Merged
Conversation
Zendesk stops accepting API tokens on 2027-04-30 and no longer issues new ones. With ZENDESK_OAUTH_CLIENT_ID and ZENDESK_OAUTH_CLIENT_SECRET set, every Zendesk job now takes a client-credentials token and renews it before its 30-minute expiry; without them it keeps using the API token, so angus runs unchanged until the client is added to zendesk.env.
ZENDESK_OAUTH_CLIENT_ID and ZENDESK_OAUTH_CLIENT_SECRET are now the only Zendesk credentials, and the job runner requires them. The --email and --api-token flags are gone with the token they configured.
urllib3 resends a call's original Authorization header on every retry, so the renewal margin now covers the session's whole default retry span (510 s) rather than two minutes.
mpretty-cyro
approved these changes
Nov 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Zendesk stops accepting API tokens on 2027-04-30, and since 2026-10-27 no new ones can be created. This moves every Zendesk job (the digest, the review resolver, the
claude:note flow) onto an OAuth client and removes API-token support.api.zendesk_session(subdomain)authenticates with a client-credentials token fromZENDESK_OAUTH_CLIENT_IDandZENDESK_OAUTH_CLIENT_SECRET. The token acts as the admin who created the client, so comments keep coming from Main Support.ClientCredentialsrenews two minutes early, so the 90-minute digest run keeps working.jobs.tomlrequires the two OAuth variables instead ofZENDESK_EMAILandZENDESK_API_TOKEN. The--emailand--api-tokenflags are removed.Deploy: this needs the two OAuth values in
/etc/session-ops/zendesk.envbefore it runs, or the digest fails on its environment check and the relay refuses every note. Add them, deploy, restartzendesk-relay, then removeZENDESK_EMAILandZENDESK_API_TOKENfrom the file.Tested: unit tests for the grant, reuse, renewal, refusal and the required variables; a read-only run against Zendesk with no API token in the environment (ticket read, a forced renewal,
users/mereturning Main Support).