WebOffice billing

Updated at:

Starting December 1, 2023, WebOffice charges per API call instead of per document opening. This change applies only to projects created on or after that date. Projects created before December 1, 2023 continue to use per-opening billing.

Billing model comparison

Under per-call billing, each call to GenerateWebofficeToken or RefreshWebofficeToken incurs one charge. Each token is valid for 30 minutes and allows only one user to open a document. 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 prevent access failures when multiple users need access, generate a separate token for each user each time they open a document.

Description

Per-opening billing (before December 1, 2023)

Per-call billing (on or after December 1, 2023)

Affected projects

Projects created before December 1, 2023

Projects created on or after December 1, 2023

Charge incurred when

A user opens a document (connection is established and later disconnected).

GenerateWebofficeToken or RefreshWebofficeToken is called.

Token time limit

No limit. A token remains valid indefinitely.

30 minutes per token.

Multi-user access

Multiple users can share one token.

One token, one user at a time. Additional users need separate tokens.

Repeated opens within token validity

Each open incurs a charge.

Only the first call is charged. Reopening within 30 minutes is free.

Switch to the per-call billing plan

To switch to per-call billing, create a new project and update your integration to use it.

  1. Create a new project in the IMM console. New projects use per-call billing by default.

  2. Update your code to call GenerateWebofficeToken each time a user opens a document, and pass the returned token to that user only. Do not reuse tokens across users.

    // Generate a new token for each document open request
    token = GenerateWebofficeToken(project=<new-project-id>, ...)
    // Pass token to the requesting user only
  3. Update the project parameter in your API calls to reference the new project.