workbuddy logo

Third-Party App

Integration Introduction

Platform Overview

WorkBuddy Open Platform uses the OAuth 2.1 specification for user authentication and authorization, and provides HTTPS-based Open APIs for developers and ecosystem partners. Third-party applications can operate on user data through the Open API after obtaining user authorization.

To protect the security and privacy of user data, third-party applications must explicitly request authorization from the user before accessing user data. After the user authorizes, the platform issues third-party credentials in accordance with the OAuth specification. Third-party applications can obtain these credentials and perform the required operations with the platform.

Core Capabilities

Capability DomainDescription
Local Assistant ChatMessage interaction with the PC local assistant via API
Cloud Task ManagementCreate and manage cloud AI tasks; supports mobile / app sessions
Artifact ManagementFetch session artifacts, incremental updates, and media file downloads
Redemption Code RedemptionRedeem WorkBuddy credits for users via vouchers or redemption codes

Terminology

RoleDescriptionTrust Boundary
Resource OwnerThe resource owner, typically a WorkBuddy userDetermines the resource scope accessible to third-party apps or connectors
Third ApplicationA standard third-party application built on WorkBuddy Open PlatformCan call Open API after user authorization
WorkBuddyThe agent runtime that executes tasks and initiates tool calls on behalf of the userShort-lived credentials should be obtained before calling
Open PlatformThe open platform responsible for app registration, authorization confirmation, token issuance, Scope management, and auditingPlatform-level trust boundary; the permission source for all open API calls

Integration Guide

Integration Flow Overview

Step 1: Create an Application and Complete Configuration

In WorkBuddy Open Platform, fill in the application basic information, permission management information, and callback URL configuration in one pass. After completing all application configuration, submit for review.

Step 2: From User Authorization to Calling APIs

The application guides the user through OAuth 2.1 authorization. After the server exchanges for access credentials, it can call the Open API. The overall process consists of three consecutive stages:

  1. First, the third-party application initiates user authorization
  2. After the user completes authorization, the application server exchanges for access credentials
  3. The application uses the access credentials to call the required Open API

For details on authorization requests, see "Auth API: Request User Authorization". For obtaining and refreshing access credentials, see "Auth API: Exchange for Access Credentials". For parameters, permissions, and response structures of specific business APIs, see "Open API Reference". The following sequence diagram shows the complete process from user authorization to API calls.


Application Registration and Authorization

Hardware Access

When creating a hardware access application, complete the basic information, permission management information, and callback URL configuration in one pass. After submission, the application enters the review process. Once approved, the application is published and the corresponding capabilities are enabled.

Application Basic Configuration

  1. Sign in to WorkBuddy Open Platform
  2. Click "Hardware Access"
  3. Fill in the basic information
  4. Configure permission management information
  5. Configure the OAuth callback URL
  6. Submit for review

Credential notes: After creation, the application enters draft status and the platform generates client_id and client_secret. client_secret is shown in plaintext only once after the application is created successfully. Keep client_secret secure and do not expose it in frontend or client code. If it is lost, contact the platform.

Application Status

StatusDescription
Under ReviewApplication configuration submitted; awaiting platform review
EnabledApplication approved and published; can call authorized Open APIs
RejectedApplication review failed; modify the configuration based on review feedback and resubmit

Authorization-related API documentation is collected in "Open API Reference".

Authorization

After the application is approved and enabled, guide the user through OAuth 2.1 authorization to obtain an access_token. The authorization flow involves two types of endpoints. Full API documentation is in "Open API Reference":

  • "Auth API" — GET /authorize (request user authorization), POST /token (exchange / refresh Token)

Token Types Overview

Token TypePurposeValidityNotes
access_tokenCredential for calling Open API24 hoursObtained via "Exchange for Access Credentials"; must be re-obtained after expiration.
refresh_tokenRefresh access_token60 daysObtained via "Exchange for Access Credentials"; must be stored securely on the server and must not be exposed in frontend or client code.

Scope Permission List

CategoryScopePermission NameDescription
User profileuser.profile.readableRead personal profileRead the user's nickname and avatar
User profileuser.contact.readableVerify contact informationCheck whether the phone number provided by the caller matches the user's phone number
Credits and benefitsuser.credit.exchangeRedeem credits via voucherRedeem WorkBuddy credits for the user via a voucher or redemption code
Cloud tasksuser.task.invokableCreate and execute cloud tasksAllow the application to create and execute cloud tasks per user instructions
Cloud tasksuser.task.readableRead task list and detailsAllow the application to read the user's cloud task list and task details
Local assistantuser.localassistant.invokableSend messages to the local assistantSend messages to the local assistant (the user's PC) to drive the on-device Agent to execute tasks
Local assistantuser.localassistant.readableRead local assistant online status and message historyRead the local assistant's (user PC) online status and conversation message history

Permission Application Guide

Application Steps

  1. On the application management page, select the Scope to apply for
  2. Describe the use case and necessity
  3. Submit for review

Principle of least privilege: Apply only for Scopes required by the application's features; when the user authorizes, request only the Scopes needed for the current operation; avoid requesting permissions beyond business needs.