reading_token_provider:start
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| reading_token_provider:start [2023/09/26 23:26] – joaosaraiva | reading_token_provider:start [2026/03/27 17:24] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | 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:// | ||
| + | |||
| + | |||
| + | 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. | ||
