explanation on how to request token

Get reading token

This operation fetches a Paperview reading token, for future inclusion in an article page. This token is detected by the paywall invoker, and allows readers to view a certain article without needing to go through the paywall. This feature is particularly important for integration with external subscription services.

URL: https://reading-token-provider.paperview-services.com/generate-token

HTTP request verb: GET / POST

Request parameters: - Query string if GET, body if POST: – (mandatory) publication_id (string): The Publication ID. – (mandatory) publication_api_key (string): The Publication API key. – article (string): The article’s Paperview ID. If not provided, the token will be valid for all of the Publication’s articles. – duration (integer): The intended duration of this token, in seconds. Use a low value for short- lived tokens (e.g., 30 seconds), or higher values for tokens that should last longer (e.g., 86400 seconds for a token that lasts 24 hours). If not provided, this will assume the value of 30 seconds.

HTTP response status code: 200 – Operation successful 400 – Invalid context (Publication ID or Publication API key missing or invalid)

Response data: - A string containing the requested reading token.