From 55bbbe5c75b7989fc0d41ee29d4fdce4cd7fa134 Mon Sep 17 00:00:00 2001 From: pancakes Date: Mon, 25 Nov 2024 01:27:10 +1000 Subject: [PATCH] Limit scopes --- login.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/login.py b/login.py index 13182c9..33b9100 100644 --- a/login.py +++ b/login.py @@ -13,7 +13,7 @@ if __name__ == "__main__": elif not os.path.exists("accounts"): os.mkdir("accounts") - Mastodon.create_app(name, to_file=f"accounts/{username}.client.secret", api_base_url=url, user_agent="fedifeeds") + Mastodon.create_app(name, scopes=["write:statuses"], to_file=f"accounts/{username}.client.secret", api_base_url=url, user_agent="fedifeeds") masto = Mastodon(f"accounts/{username}.client.secret") - print(masto.auth_request_url()) - masto.log_in(username, code=input("code: "), to_file=f"accounts/{username}.secret") + print(masto.auth_request_url(scopes=["write:statuses"])) + masto.log_in(username, code=input("code: "), scopes=["write:statuses"], to_file=f"accounts/{username}.secret")