1. End-User Enrollment & OAuth Flow
FoxCloud OpenAPI
Vpp Flow
  • Vpp Flow
  • Full API Reference
  • What's New & Milestones
  • Getting Started
    • 1. Overview & Integration Scope
    • 2. Environments & Prerequisites
  • End-User Enrollment & OAuth Flow
    • 0. Introduction
    • 1. The User Authorization Journey
    • 2. OAuth Token Operating Model
    • 3. Implementation Guide
  • API Technical Specifications
    • 1. Universal Request Rules
    • 2. Rate Limiting Strategy
    • 3. Response Structure
    • 4. Error Code Reference
  • Telemetry & Data Acquisition
    • 1. Data Pipeline & Scaling Strategy
    • 2. Telemetry Data Query (Real-time)
    • 4. Telemetry Variable Dictionary
    • 5. System Performance & SLA
    • 3. Device Configuration & Settings: Pre-Dispatch State Awareness
  • Control Commands & Dispatch
    • 1. Core Dispatch Architecture: Scheduler V3
    • 2. Scheduler V3 Operations
    • 3. Real-time Device Settings
    • 4. Strategic Roadmap: Scaling for Massive Fleets
  • FAQ
    • Troubleshooting Quick Guide
  1. End-User Enrollment & OAuth Flow

3. Implementation Guide

Phase 1: Device Selection (User-Facing)#

This phase lets the end user select and confirm a device in FoxESS H5. It establishes the device binding for your VPP platform.
1. Redirect User to Device Selection
Redirect the user to the FoxESS H5 page. The user signs in, reviews eligible devices, and confirms the device to enroll.
scope = The permissions required from the end user (for example, data_access,device_control).
URL Example:
2. Receive the Selected Device SN
After the user confirms their selection, the browser is redirected back to your redirect_uri with the selected device deviceSn appended to the URL.
Callback Example:
Store the SN with the end-user record in your platform so that your onboarding flow can show the correct device and its enrollment status.

Phase 2: Platform Operations (Backend)#

Use an OAuth token for all API calls to devices enrolled in your VPP fleet.
1. Obtain an OAuth Token
Your application server uses the client-credentials grant with its client_id and client_secret to request an OAuth token directly.
Request Example:
Note: The OAuth token is valid for 24 hours. Request a new token with your client credentials when needed.
2. Offboarding Devices
When a user leaves the program or you need to release a device, call POST /op/v0/vpp/oauth2/client/offboard with an OAuth token. This unbinds the device without requiring an active end-user session.
Modified at 2026-08-04 03:29:55
Previous
2. OAuth Token Operating Model
Next
1. Universal Request Rules
Built with