Files
FreshRSS/docs/en/developers/06_Fever_API.md
polybjorn b08c4ef243 docs: standardise English heading style and surface hidden pages (#8766)
Apply sentence case to all H1s in docs/en/ and remove redundant "FreshRSS"
from titles where the docs site context already implies it. Align the three
section index titles to "Administrator/Developer/User manual", matching
the existing root H1 "FreshRSS manual (English)".

Add missing H1s to two pages that were silently dropped from the sidebar:
the user FAQ and the Caddy reverse proxy page. The sidebar template uses
page.title (derived from H1 by jekyll-titles-from-headings), so pages
without an H1 had title=nil and were skipped.

Update sidebar parent labels in docs_nav.html and the chapter list in
en/index.md to use the new "* manual" naming. Update link text in section
indexes that referenced the old H1s. Bundle two grammar fixes encountered
along the way: "an User Interface" -> "a user interface", and drop the
awkward "the" in "Configuring the email address validation".

EN only. No filenames, URLs, or anchor targets changed (anchors come from
H2 and below, which are untouched). FR is generated from EN via po4a and
will be regenerated separately.

Co-authored-by: Bjørn A. Andersen <polybjorn@users.noreply.github.com>
2026-05-02 22:23:35 +02:00

115 lines
5.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Fever API implementation
See [Mobile access](../users/06_Mobile_access.md) for general aspects of API access.
Additionally [page about our Google Reader compatible API](06_GoogleReader_API.md) for another possibility.
## RSS clients
There are many RSS clients that support the Fever API, but they seem to understand the Fever API a bit differently.
If your favourite client doesnt work properly with this API, please create an issue and well have a look.
But we can **only** do that for free clients.
### Usage & Authentication
Before you can start using this API, you have to enable and setup API access, which is [documented here](../users/06_Mobile_access.md),
and then reset the users API password.
Then point your mobile application to the `fever.php` address (e.g. `https://freshrss.example.net/api/fever.php`).
## Compatible clients
| App | Platform | License |
|:----------------------------------------------------------------------------------:|:-------------------:|:--------------------------------------------------------:|
|[Fluent Reader](https://hyliu.me/fluent-reader/) |Windows, Linux, macOS|[BSD-3-Clause](https://github.com/yang991178/fluent-reader/blob/master/LICENSE)|
|[Fluent Reader lite](https://hyliu.me/fluent-reader-lite/) |Android, iOS |[BSD-3-Clause](https://github.com/yang991178/fluent-reader-lite)|
|[Read You](https://github.com/Ashinch/ReadYou/) |Android |[GPLv3](https://github.com/Ashinch/ReadYou/blob/main/LICENSE)|
|[Fiery Feeds](https://voidstern.net/fiery-feeds) |iOS |Closed Source |
|[Newsflash](https://gitlab.com/news-flash/news_flash_gtk/) |Linux |[GPLv3](https://gitlab.com/news-flash/news_flash_gtk/)|
|[Unread](https://www.goldenhillsoftware.com/unread/) |iOS |Closed Source |
|[Reeder Classic](https://www.reederapp.com/classic/) |iOS |Closed Source |
|[ReadKit](https://readkit.app/) |macOS |Closed Source |
|[FreshRSS Python API Client](https://github.com/thiswillbeyourgithub/freshrss_python_api) |Python |[GPLv3](https://github.com/thiswillbeyourgithub/freshrss_python_api) |
## Features
The following features are implemented:
* fetching categories
* fetching feeds
* fetching RSS items (new, favorites, unread, by_id, by_feed, by_category, since)
* fetching favicons
* setting read marker for item(s)
* setting starred marker for item(s)
* setting read marker for feed
* setting read marker for category
* supports FreshRSS extensions, which use the `entry_before_display` hook
The following features are not supported:
* **Hot Links** aka **hot** as there is nothing in FreshRSS yet that is similar or could be used to simulate it.
## Testing and debugging
If this API does not work as expected in your RSS reader, you can test it manually with a tool like [Postman](https://www.getpostman.com/).
Configure a POST request to the URL <https://freshrss.example.net/api/fever.php?api> which should give you the result:
```json
{
"api_version": 3,
"auth": 0
}
```
Great, the base setup seems to work!
Now lets try an authenticated call. Fever uses an `api_key`, which is the MD5 hash of `"$username:$apiPassword"`.
Assuming the user is `kevin` and the password `freshrss`, here is a command-line example to compute the resulting `api_key`
```sh
api_key=`echo -n "kevin:freshrss" | md5sum | cut -d' ' -f1`
```
Add a body to your POST request encoded as `form-data` and one key named `api_key` with the value `your-password-hash`:
```sh
curl -s -F "api_key=$api_key" 'https://freshrss.example.net/api/fever.php?api'
```
This should give:
```json
{
"api_version": 3,
"auth": 1,
"last_refreshed_on_time": "1520013061"
}
```
Perfect, youre now authenticated and you can start testing the more advanced features. To do so, change the URL and append the possible API actions to your request parameters. Please refer to the [original Fever documentation](https://web.archive.org/web/20230616124016/https://feedafever.com/api) for more information.
Some basic calls are:
* <https://freshrss.example.net/api/fever.php?api&items>
* <https://freshrss.example.net/api/fever.php?api&feeds>
* <https://freshrss.example.net/api/fever.php?api&groups>
* <https://freshrss.example.net/api/fever.php?api&unread_item_ids>
* <https://freshrss.example.net/api/fever.php?api&saved_item_ids>
* <https://freshrss.example.net/api/fever.php?api&items&since_id=some_id>
* <https://freshrss.example.net/api/fever.php?api&items&max_id=some_id>
* <https://freshrss.example.net/api/fever.php?api&mark=item&as=read&id=some_id>
* <https://freshrss.example.net/api/fever.php?api&mark=item&as=unread&id=some_id>
Replace `some_id` with a real ID from your `freshrss_username_entry` database.
### Debugging
If nothing helps and your client is still misbehaving, you can add the following lines to the beginning of the `fever.api` file to determine the cause of the problems:
```php
file_put_contents(__DIR__ . '/fever.log', $_SERVER['HTTP_USER_AGENT'] . ': ' . json_encode($_REQUEST) . PHP_EOL, FILE_APPEND);
```
Then use your RSS client to query the API and afterwards check the file `fever.log`.
## Credits
This plugin was inspired by the [tinytinyrss-fever-plugin](https://github.com/dasmurphy/tinytinyrss-fever-plugin).