Get started
  • English
  • 简体中文
Official Site
Get started
  • English
  • 简体中文
Official Site
  • Get started
  • Concepts
  • Guides
  • Device capabilities & events
  • API reference
    • Public conventions
    • Development specification
    • accessToken: Get administrator token
    • API request example
    • Return codes
    • Interface call limits
    • Account docking
      • OAuth authorization
        • oauthTokenV2: Exchange or refresh OAuth tokens
        • getStreamUrl: Get RTSP stream URL
      • createSubAccount: Create Sub Account
      • getOpenIdByAccount: Get openid based on sub-account
      • deleteSubAccount: Delete subaccount
      • listSubAccount: Get the list of sub-accounts
      • subAccountToken: Get subaccount token
      • addPolicy: Add sub-account permissions
      • clearPolicy: Clear sub-account authorization policy
      • queryDevicePermission: Sub-account device dimension permission
      • deleteDevicePermission: Delete sub-account device permission
      • listSubAccountDevice: Query the list of devices with permissions for the sub-account
    • Device APIs
    • Device live broadcast
    • Push configuration
    • Cloud storage service
    • Resource pool quota
    • Legacy APIs (deprecated)
  • SDK and tools
  • Solutions
  • Platform and support
On this page
Module overview
API list
OAuth with other APIs
Related

OAuth authorization APIs

OAuth authorization

Module overview

These APIs operate on devices that an end user authorized to your OAuth project. They are not sub-account APIs and do not use the administrator accessToken from accessToken.

Use the OAuth Project Access Key and Project Secret Key (console OAuth project). Pass the end user's OAuth access token (Ot_ prefix) where a method requires token in params.

Product flow and billing: OAuth 2.0 authorization. Sub-account model: Sub-accounts and policies — do not mix OAuth user tokens with sub-account or administrator tokens.

API list

No.APIDescription
1oauthTokenV2: Exchange or refresh OAuth tokensauthorization_code or refresh_token grant
2getStreamUrl: Get RTSP stream URLRTSP URL for an authorized device channel

OAuth with other APIs

Device query, configuration, messages, thing models, and other capabilities documented under 05-api may support OAuth-authorized calls when you sign requests with the OAuth project keys and pass the end user's Ot_ token in params.token. See Development specification for the JSON request body and signature rules. OAuth-specific errors include OA1005 and OA1007 in Return codes.

Related

Development specification · Return codes