Fxiaoke Developer Manual Fxiaoke Developer Manual
  • APL Development Manual
  • PWC Development Manual
  • OpenAPI Documentation
  • Quick Start
  • API Authorization
  • API Basics
  • OpenAPI
  • SSO Integration
  • Client Development
  • FAQ
  • OpenApi Version V1 (opens new window)
  • 简体中文
  • English
  • Quick Start
  • API Authorization
  • API Basics
  • OpenAPI
  • SSO Integration
  • Client Development
  • FAQ
  • OpenApi Version V1 (opens new window)
  • 简体中文
  • English
  • Quick Start

  • API Authorization

    • OAuth Authorization

      • Client Credentials Grant
      • Authorization Code Grant
      • Refresh Token
    • API Basics

    • OpenAPI

    • SSO Integration

    • Client Development

    • FAQ

    Table of Contents

    Refresh accessToken

    The access_token is the credential for calling authorized APIs. Since the access_token has a short validity period, you can use refreshToken to refresh it when the accessToken expires.

    The refresh_token has a longer validity period (2 months). When the refresh_token expires, user re-authorization is required.

    # Request Specification

    HTTP Method: POST + application/json

    Request URL: https://${Cloud Domain}/oauth2.0/token?thirdTraceId=${Random String}

    # Request Parameters

    Parameter Type Required Description
    grantType String Yes Authorization mode, fixed value: refresh_token
    appId String Yes App ID of the self-built application
    appSecret String Yes App secret of the self-built application
    refreshToken String Yes The refreshToken returned by the get token API

    # Request Example

    {
        "grantType": "refresh_token",
        "appId": "FSAID_xxxxx",
        "appSecret": "982axxxxx",
        "refreshToken": "xxxxxx"
    }
    

    # Response Parameters

    Parameter Required Description
    openUserId Yes User's openUserId
    accessToken Yes Authorization token with 2-hour validity
    refreshToken Yes Used to refresh accessToken, valid for 2 months
    expiresIn Yes Expiration time

    # Response Example

    {
        "openUserId": "FSUID_xxxxx",
        "accessToken": "FSTOK_xxxxx",
        "refreshToken": "FSREFTOK_xxxxx",
        "expiresIn": 7200,
        "errorCode": 0,
        "errorMessage": "success",
        "traceId": "E-O.fkxxxxxx8bd6"
    }
    
    Authorization Code Grant
    Testing Tool

    ← Authorization Code Grant Testing Tool →

    • 跟随系统
    • 浅色模式
    • 深色模式
    • 阅读模式