Modify Preview Settings

View Markdown

Last edited on 2026-03-25

This API should be called on the server side and cannot be called directly on the client side (Mini Program, web page, APP, etc.). For details, please refer to API Call Guide.

API English Name: setPreviewSetting

Set the number of preview words for book chapters.

1. Call Method

HTTPS Call

POST https://api.weixin.qq.com/wxa/business/novelreader/setpreviewsetting?access_token=ACCESS_TOKEN

Cloud Call

  • This API does not support cloud call.

Third-party Call

  • This API supports third-party platforms on behalf of Merchant call.

  • The permission set ID of this API is: 169

  • After the service provider obtains one of the permission set authorizations, it can use authorizer_access_token to call on behalf of Merchant, for details please refer to Third-party Call documentation.

2. Request Parameters

Query Parameters Query String Parameters

ParameterTypeRequiredExampleDescription
access_tokenstringYesACCESS_TOKENAPI call credential, you can use access_token, authorizer_access_token

Request Body Request Payload

ParameterTypeRequiredDescription
book_idstringYesWork ID
default_wordsnumberYesDefault preview word count
chapter_indexnumberNoChapter index, starting from 0. Chapters without a specific setting will use default_words as the preview word count.
wordsnumberNoChapter word count

3. Response Parameters

Response Body Response Payload

ParameterTypeDescription
errcodenumberError code

4. Notes

No special notes for this API

5. Code Example

Request Example

{
    "setting": {
        "book_id": "test",
        "default_words": 240,
        "chapter_setting": [
            {
                "chapter_index": 1,
                "words": 123
            }
        ]
    }
}

Response Example

{
    "errcode": 0
}

6. Error Codes

The following is the error code list of this API, other error codes can refer to Common Error Codes; When encountering errors in calling the API, you can use the official API Diagnostic Tool to assist in locating and analyzing problems.

Error CodeError Description
-1System failure
0Success
10140001Invalid parameter
10140002Please use UTF-8 encoding
10140003Invalid work title
10140004Invalid work description
10140005Invalid cover image
10140006Invalid author
10140007Invalid work type
10140008Invalid completion status
10140009Invalid upload scenario
10140010Invalid chapter index list. Please check for duplicates or uncovered chapters.
10140011Invalid chapter ID list. Please check for duplicates, chapter IDs not belonging to this work, or uncovered chapters.
10140012Invalid volume list. Please check if volume titles are standard, and if ranges overlap or fail to cover all chapters.
10140013Missing chapter information
10140014Too much chapter information
10140015Missing work ID
10140016Too many work IDs
10140017Invalid maximum pagination result count
10140018Invalid chapter title
10140019Invalid chapter content
10140020Invalid sort operation
10140021Invalid chapter sorting method
10140022Missing chapter seq
10140023Duplicate provider primary key exists in the request parameters
10140024Invalid provider primary key
10140025Invalid priority
10140026Invalid custom information
10141001Corresponding information not found
10141002Operation not allowed
10141003Work is under review
10141004Failed to add review information
10141005Too many failed checks
10141006Work has not passed review and cannot be published
10141007Work is missing chapters
10141008Work volume information needs to be updated
10141009Provider primary key conflict
10141010This API is incompatible with the current work's chapter sorting method. Please modify the chapter sorting method before making this call.
10145001Operation result is empty
10145002System call failed
10145003Missing input parameters
10145004Invalid authorized work ID
10145005Authorizer is not in the Novel category
10145006Authorizee is not in the Novel category
10145007Expired time information or abnormal authorization time
10145008Too many or too few works submitted for authorization at once (count = 0 or count > 20)
10145009Too many records fetched in one authorization list query (count > 100)
10145010Some authorization records failed to be added
10145011Invalid AppID
10145012Authorizer and authorizee cannot be the same

7. Applicable Scope

The callable account types for this API are not yet clear, or are determined by the calling parameters in business. Please refer to the actual calling situation.