Verify an IC agent token you did not mint (service)
ic_token_verifyVerify an IC member's agent token that YOUR service accepted, without spending that member's rate budget. *** DO NOT VERIFY BY HTTP STATUS CODE. *** IC's agent surface returns HTTP 200 with an in-band error envelope for an INVALID or absent token (e.g. {ok:false, error_kind:'no_token'}) — it does NOT return 401. Any check of the form if (response.ok) tokenIsValid = true therefore ADMITS EVERY FORGERY and fails OPEN. That is true of this tool too: a forged token gets HTTP 200 here. Validity is the status field in the BODY and nothing else. READ status, WHICH IS THREE-VALUED: 'valid' | 'invalid' | 'indeterminate'. Do NOT branch on !valid — valid is null when status is 'indeterminate'. 'indeterminate' (rate_limited / backend_unavailable / internal_error) means WE could not answer; it is NOT a rejection, so a rate-limited but perfectly good member must not be refused on it. Retry with backoff, and NEVER write an indeterminate result into a positive cache — otherwise anyone can manufacture a 'valid' verdict by DoSing the verifier. SCOPE DISCLOSURE IS INTERSECTED with your own token's scopes — you learn only which of YOUR capabilities the subject also holds, and scopes_filtered tells you the list was narrowed; it is a floor on their capability, never the whole of it. status:'valid' means the token is live and unrevoked, NOT that the bearer string alone can act: if requires_signature is true the token also needs an RFC 9421 signature per request. Verification never bumps the subject's rate counter or last_used_at, and never echoes the token back — key any cache of your own on a hash, never the raw token. Args: { token }. Returns: { ok, status, valid, member_id?, member_name?, tier?, scopes?, scopes_filtered?, token_prefix?, requires_signature?, sandbox?, reason? }. reason is malformed|unknown|revoked|no_scopes when status='invalid', and rate_limited|backend_unavailable|internal_error when status='indeterminate'. Rate: 200 verifications per calling token per UTC day. Required scope: agent:token:verify (ft-member+).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| token | Yes | The agt_... token to verify. Never logged, never echoed back. |