8 GPodder API
SamTV12345 edited this page 2024-01-12 21:13:46 +01:00

⚙️ Using the GPodder API

  • Before moving forward please follow one of the tutorials mentioned here or read the documentation under docs/AUTH.md.

👤 Create a user via the CLI

For AntennaPod to succesfully authenticate it requires a username and password. In order to enable that we jump to the commandline. If you have PodFetch running in Docker just execute:

docker ps #This will help you obtain the container's id and name
docker exec -it <your-container-id> /app/podfetch users add

After that a dialog opens up. I paste here a sample you can change username and password etc. to the values you like.

Starting from command line
User management
Enter your username:
myUsername
User does not exist
Enter your password:

Select your role user, admin, uploader
user
Should a user with the following settings be applied User { id: 0, username: "myUsername", role: "user", password: Some("myPassword"), explicit_consent: false, created_at: 2023-07-22T10:39:59.297771400 }
Y[es]/N[o]
Yes
User succesfully created

After that you have created a user with the username myUsername and the password: myPassword. It is enough to have him assigned to the role user. You could e.g. switch to another admin user that adds new podcasts for increased security.

🖂 Create a user via the UI

You can also generate a user using the invite function within the GUI

To generate an invite, log into Podfetch → Top Right Icon → User Administration → Invites . This works on both basic auth and OIDC.

📱 Setting up AntennaPod

First download the app:

After opening the app, press the burger menu and tap settings. Go to synchronisation => Select provider => GPodder.net Enter the server url in the only textfield in this screenshot

1. Enter here your SERVER_URL.

⚠️ AntennaPod always chooses https and thus requires a valid SSL certificate from e.g. Let's Encrypt. If you want to host PodFetch in your local network it is okay to not use SSL. Therefore you can use http:// to establish an insecure connection which AntennaPod will complain in the next steps about.

2. Enter the username and password of the user that you created before through the CLI

A screenshot showing the login form. You have to first enter the username of the user you created, after that the password

3. Choose an existing device or create a new device

A user can have different devices or restore from existing device configuration. This is what the next view is about. You can choose between using an existing device. That is the ovale device below. This can be done by simply tapping on it.

If you don't see a device because you started the server from scratch you can name your device to a memorable one so you can later select the correct device better.

A screenshot showing the device selection screen. You can create a new device or pick an existing device below.

4. Success screen

You should now see this screen. Tap on Sync now and the modal should close leaving you at the synchronisation page.

Success screen
  1. Test the settings

You can test the settings by tapping on Sync now. After a short period the title on the navbar should change to Success #currentTimestamp

  1. Import the respective podcast into podcast Because not everybody can download/create a podcast it is necessary to also download a podcast to the server. Therefore go to the homepage and add the podcast. If the rss feeds are the same they are linked in the backend and you can listen to the podcasts from your phone or via the web and the two locations synchronize with each other.