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
    • Device APIs
    • Device live broadcast
    • Push configuration
    • Cloud storage service
    • Resource pool quota
      • createResourcePool: Create a resource pool
      • getResourcePool: Get resource pool details
      • listResourcePoolByPage: List resource pools
      • modifyResourcePool: Modify a resource pool
      • removeResourcePool: Remove a resource pool
      • bindSubAccountToResourcePool: Bind sub-account to pool
      • bindDeviceToResourcePool: Bind device channel to pool
      • unbindSubAccountFromResourcePool: Unbind sub-account from pool
      • unbindDeviceFromResourcePool: Unbind device channel from pool
      • listSubAccountResourcePoolConfigByPage: List sub-accounts in pools
      • listDeviceResourcePoolConfigByPage: List device channels in pools
      • getSubAccountResourcePoolConfig: Get pools for sub-account
      • getDeviceResourcePoolConfig: Get pools for device channel
      • queryOauthUserQuota: Query OAuth user flow quota
      • saveOauthUserQuota: Set OAuth user flow quota
    • Legacy APIs (deprecated)
  • SDK and tools
  • Solutions
  • Platform and support
On this page
Function details
Request address
Request format
Incoming parameter description
Sample input
Return data field description
Sample output
Error codes
Notes
Related

queryOauthUserQuota: Query OAuth user flow quota

queryOauthUserQuota: Query OAuth user flow quota

Function details

Returns the monthly flow cap (GB) for the current OAuth end user. This applies to the OAuth 2.0 authorization model, not to sub-account or device-channel resource pools.

Requires the end user's OAuth access token (Ot_ prefix) from oauthTokenV2. Do not use administrator (At_) or sub-account (St_) tokens.

Request address

https://openapi-[DataCenter].easy4ip.com/openapi/queryOauthUserQuota

Request format

HTTP POST. JSON body layout: Request conventions. Sign with Signature.

Incoming parameter description

Parameter nameParameter typeRequired or notDefault valueLegal valueParameter description
tokenStringYesOt_ prefixEnd-user OAuth access token

Sample input

{
    "system": {
        "ver": "1.0",
        "appId": "lcdxxxxxxxxx",
        "sign": "xjhCQBoJ9hRDsCjyDcHjtDNzRZ3ZJezcawsfWeiaoxU=",
        "time": 1603350473,
        "nonce": "a4d59add-0f04-4b7e-9355-d1fb4e9dc22b"
    },
    "id": "d82a7fa7-655f-4bb8-ab75-72bb3dfa3a94",
    "params": {
        "token": "Ot_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
    }
}

Return data field description

FieldTypeDescription
quotaGbStringAvailable cap for the current calendar month, in GB

Sample output

{
    "id": "123456",
    "result": {
        "data": {
            "quotaGb": "100"
        },
        "code": "0",
        "msg": "The operation was successful."
    }
}

Error codes

This method may return the codes below. See Return codes.

Gateway and auth (SN / TK / OP)

CodeMeaningNext step
SN1001Signature errorCheck sign per Development specification
TK1002Token invalid or expiredRefresh accessToken
OP1002Missing required parameterAdd required fields
OP1003Invalid parameterMatch this page’s parameter table
OP1009Permission deniedCheck token and device bind/share grants
OP1013Total call limit exceededReduce call rate
OP1014Daily per-interface limit exceededSee Interface call limits
DV1007Device offlineWait until the device is online

See Return codes · OP/SN/TK for the full catalog.

OAuth (OA)

CodeDescriptionNext step
OA1005This API does not support OAuth user actionsConfirm the API supports OAuth user tokens; see OAuth authorization module
OA1007The OAuth appId is invalidUse the OAuth project Access Key as system.appId and sign with the project Secret Key

Notes

  • Pair with saveOauthUserQuota to set and read the monthly cap.
  • For sub-account or device-channel flow pools, use the other *ResourcePool* methods in this module.

Related

  • Module index
getDeviceResourcePoolConfig: Get pools for device channel
saveOauthUserQuota: Set OAuth user flow quota