All Products
Search
Document Center

Intelligent Media Management:WebOffice billing

Last Updated:Dec 02, 2024

On December 1, 2023, WebOffice billing transitioned to a per-call policy. This change specifically affects the billing for the API operations GenerateWebofficeToken and RefreshWebofficeToken. The per-call billing applies only to projects that are created on or after this date, and billing is based on the number of API calls for document previewing or editing. In contrast, projects created before December 1, 2023, are billed based on the number of times the document is opened.

Billing comparison

  • Per-opening billing: Billing is based on the number of times a document is opened. A document opening operation initiates and establishes a long connection to the server. When the connection is disconnected, the billing data is updated. In this billing policy, an access token is not time-limited and can be used by multiple users to open the document any number of times. However, each time the document is opened, a charge is incurred.

  • Per-call billing: Billing is based on the number of calls to API operations (GenerateWebofficeToken and RefreshWebofficeToken). Each call incurs a charge. A call returns an access token, which allows only one user to open a document for 30 minutes. Opening the document multiple times within the token validity period incurs only one charge. If multiple users attempt to use the same access token to open the same document, only the user who last makes the request can open it. Document access permissions granted to previous users are revoked. To avoid document access failures, use a new access token each time you open a document.

The following table describes the differences between the two billing policies.

Per-opening billing (for projects created before December 1, 2023)

Per-call billing (for projects created on and after December 1, 2023)

Charge incurred when

The long connection from a document opening is disconnected.

An API operation call is made.

Limit on the number of users allowed

No such limit applies. An access token can be used by multiple users.

An access token can only be used by a single user to access a document at any given time. For multiple users to access a document at the same time, each user requires a different access token.

Billing policy switching

  1. Create a project in the IMM console. The project uses per-call billing by default.

  2. Adjust your code to generate an access token each time a document opening operation is requested, and allow an access token to be used only by one user at a time.

  3. Replace the original project with the newly created project in API calls.