Website integration
What this type is for
Choose Website integration when the primary interface and business logic live in an external service and a user needs to connect a Senler AI project or authorize work on behalf of their account. Examples include a CRM, payment service, analytics product, or an account area on the developer's website.
Connection starts on the external site. The user approves the requested permissions in Senler AI, after which the integration server receives OAuth tokens. With project access, the token belongs to one selected project. With user access, the integration can address approved projects and developer applications on the user's behalf, while every call remains limited by the user's current permissions.
How a user connects the integration
- The user starts the connection on the developer's website.
- Senler AI opens an authorization page with the application name and the exact requested permissions. For project access, the user also selects a project; for user access, they approve actions on behalf of their account.
- After approval, Senler AI returns the user to an allowed Redirect URI, and the integration server exchanges the returned code for tokens.
A published application can have a plugin catalog card that opens the developer's website and a link to its documentation.
Events for agents
Website integration does not add callable tools to an agent or embed the application interface in the cabinet. However, an application with project OAuth access can emit declared agent events. For example, it can report a successful payment and start an agent in the related dialog.
First, the developer declares the event type and its data schema. After installation, the user enables that event for the required agent. The integration then calls POST /api/app-agent-events with a unique external_event_id, event type, data, and target.dialog_id and target.agent_id. See the events article for the request example and retry rules. Senler AI validates the installation, schema, subscription, and agent assignment to the dialog. If validation succeeds, the event starts the selected agent; without a subscription, it is accepted with an ignored status and does not start a response.
Agent events are not available with user-account OAuth access because they require an application installation in a specific project. If an agent must call application functions itself, use Plugin. Use Ready-made solution when a complete set of resources must be installed into a project.
What the developer configures
- During creation, select Website integration, then add the name, description, avatar, and website in Application settings and publish user documentation.
- Under OAuth settings, configure permissions for project and user scenarios separately, save Redirect URIs, and store the Client Secret securely.
- Exchange
authorization_codefor an access token on the server, renew it throughrefresh_token, and never send the Client Secret to the browser. - When needed, declare agent events, add webhooks, and publish service documentation.
OAuth access
Creating the application and knowing its Client ID or Client Secret does not grant data access. Access begins only after the user explicitly approves OAuth and is limited to selected permissions. Each authorization request chooses the project or user scenario through subject; one application can use both. Revoking the authorization ends the external service's access.
Before publication
Check the developer website, a working HTTPS Redirect URI, Russian and English texts, the minimum permission set, the access revocation flow, and user documentation. Then submit the application for moderation from Catalog publication.