diff --git a/app/server_api.py b/app/server_api.py index 010ad29..3009610 100644 --- a/app/server_api.py +++ b/app/server_api.py @@ -1,6 +1,9 @@ import httpx import json from base_api import BaseAPI +from config import Config + +app_config = Config() class RadioAPIClient(BaseAPI): """ @@ -62,8 +65,9 @@ class RadioAPIClient(BaseAPI): Returns: str: A token for the bot to use """ - print(f"Fetching a token from {self.base_url}/request_token") - return await self._request("POST", "/request_token") + url = "/bots/request_token" + print(f"Fetching a token from {self.base_url}{url}") + return await self._request("POST", url, json={"client_id":app_conf.client_id}) async def send_command(self, client_id: str, command_name: str, args: list = None): """