Overview
Agent authorization allows your agent to manage settings that you would otherwise change in the Knot Dashboard, such as creating webhook endpoints. It does not use Basic Authentication with yoursecret. Instead, you approve each request for access in the Knot Dashboard and the agent receives a short-lived access token (expiring after 15 minutes) that acts on your behalf.
The authorization URL is https://api.dashboard.knotapi.com and it manages settings for both the Knot development and production environments. Each access token manages only the environment of the client ID it was issued for, so use your development client ID for development and your production client ID for production.
Scopes
| Scope | Grants access to |
|---|---|
webhooks:read | Get and list webhook endpoints. |
webhooks:write | Create, update, and delete webhook endpoints. |
Permissions
The approving user’s role determines what the access token can change:Get an access token
Request a device code
Call Request Device Code with your client ID for the environment you want to manage, found in the Knot Dashboard, and the scopes you need. Never send your
secret: requests that include it are rejected.Request
Response
Ask the user to approve the request
Show the user the
verification_uri and the user_code. The user opens the link, logs in to the Knot Dashboard account that owns the client ID, enters the user_code, reviews the requested scopes, and approves. The codes expire after 10 minutes.Poll for the access token
Call Request Access Token every
interval seconds until it returns an access token. Stop on access_denied, expired_token, or invalid_grant.cURL
Handle access tokens safely
An access token grants access to your Knot Dashboard settings until it expires. If an AI agent makes these requests, the access token can appear in the agent’s context and session transcript.- Store the access token in a file readable only by your user (for example, mode
0600) and reference it from there. Do not print it. - Delete the file when you finish.
- Access tokens can’t be revoked from the Knot Dashboard. They expire after 15 minutes, and removing the approving user or changing their role takes effect on the next request.