get_user_auth_status
Checks the current status of aconsent_grant_id: whether it is still a valid binding, the capability scopes it covers, its expiry time, and the suggested next_action when it is not bound.
Authorization flow:
request_user_bind → verify_user_bind to get consent_grant_id → call get_user_auth_status to probe it before business calls. consent_grant_id is a parameter of this tool (required); an Agent can bind multiple users, so without a grant there is no way to say which authorization to check.Invalid/expired does not error: when the
consent_grant_id is invalid, expired, or belongs to a different capability, this tool does not raise an error — it returns bound: false with next_action: "request_bind" (re-run the bind flow). Decide based on the bound field in the response body, not on an error code.Parameters
Returns
When still a valid binding:Decrypting the phone number
phone_encrypted is ciphertext. The key is derived from your own API Key — we do not issue a separate one. Two steps:
- Step 1 · Derive the key: HMAC-SHA256 over your API Key with the fixed message
clawdot/phone-encryption/v1, giving a 32-byte key. - Step 2 · Decrypt: Base64-decode
phone_encrypted; the first 12 bytes are the IV and the rest is AES-256-GCM ciphertext (last 16 bytes are the auth tag). Decrypt with the key from step 1 to get the phone number.
Python
Node.js
Go
Rotating your API Key makes old ciphertext undecryptable: the key is derived from the API Key, so rotating one rotates the other. Decrypt on receipt; do not store ciphertext long-term expecting to decrypt it later.A wrong key fails loudly rather than producing garbage: AES-GCM is authenticated, so a wrong key or tampered ciphertext raises an error.Prefer decrypting in your own backend: have the Agent pass the ciphertext through untouched to your server and decrypt there, so the phone number never appears in the conversation context or in third-party platform logs.
Error Codes
An invalid / expired / capability-mismatched
consent_grant_id does not error; it returns bound: false instead (see above). See Error Handling for the full list.

