Glossary

Entitlements object

An Entitlements Object is a JSON representation of a single entitlement for a publication, to be associated with a subscription-linked reader account.

Fields

  • product_id: An identifier formed by merging the publication ID (generally the domain of the publication) and the name or level of entitlement.
  • subscription_token: A publisher-provided string representing their understanding of a subscription. Google stores this, but does not use it for anything.
  • detail: A user-facing description of the entitlement. This is surfaced in the reader's self-service My Accounts page for better identifying their entitlements.
  • expire_time: A timestamp in RFC 3339 format. The maximum expire_time is 398 days from now(). If you need to support a longer entitlement period, you must update the expire_time to extend it before it reaches the expire_time.

Entitlements object example

const entitlement = {
  "product_id": "dailybugle.com:basic",
  "subscription_token": "dnabhdufbwinkjanvejskenfw",
  "detail": "This is our basic plan",
  "expire_time": "2022-08-19T04:53:40+00:00"
}

Background on GCP OAuth service accounts