Forum rules
Under no circumstances is spamming or advertising of any kind allowed. Do not post any abusive, obscene, vulgar, slanderous, hateful, threatening, sexually-orientated or any other material that may violate others security. Profanity or any kind of insolent behavior to other members (regardless of rank) will not be tolerated. Remember, what you don’t find offensive can be offensive to other members. Please treat each other with the kind of reverence you’d expect from other members.
Failure to comply with any of the above will result in users being banned without notice. If any further details are needed, contact: “The team” using the link at the bottom of the forum page. Thank you.
ryhaltswhiskey
Posts: 1
Joined: Sun Feb 09, 2025 10:47 pm

Where do I put the API key in Linux / Kodi / Flatpak configs?

Sun Feb 09, 2025 10:52 pm

I have the API key but typing that in to the Kodi interface is a hassle. Can I just place the API key in a config file?

Code: Select all

~/.var/app/tv.kodi.Kodi % ls data/addons/service.subtitles.opensubtitles-com/ addon.xml changelog.txt fanart.jpg icon.png LICENSE.txt logo.png README.md resources service.py
I guess addon.xml? but I don't see any API key elements in the XML.

User avatar
oss
Site Admin
Posts: 6126
Joined: Sat Feb 25, 2006 11:26 pm
Contact: Website

Re: Where do I put the API key in Linux / Kodi / Flatpak configs?

Tue Feb 11, 2025 5:54 pm

Hi

only developers should put their API key. You as end user always put only your username and password.

ethelandino
Posts: 3
Joined: Wed Feb 19, 2025 10:16 pm

Re: Where do I put the API key in Linux / Kodi / Flatpak configs?

Thu Feb 20, 2025 9:35 pm

To set the API key in Linux/Kodi/Flatpak, you can add it to the configuration file. Many users suggest adding the key to the addon.xml file of the addon.

If there is no space for the API key in addon.xml, you can try using the addon's Python scripts. For example, in the directory associated with the OpenSubtitles addon, there is a service.py file. In it, you can add the code for the API key.

The API key can be placed in the following path:
~/.var/app/tv.kodi.Kodi/data/addons/service.subtitles.opensubtitles-com/

This folder contains files associated with the addon: addon.xml, README.md, and others.

There may not be room for the API key in addon.xml, but you can write code in service.py that will read the key from the configuration file or from a variable. This way you won't have to enter the key manually when you start Kodi (https://forum.kodi.tv/showthread.php?tid=377279)

Return to “Programs using OS”

Who is online

Users browsing this forum: No registered users and 4 guests