From eaf3d114a687ab8e8209ef053f5c413fe6c044b9 Mon Sep 17 00:00:00 2001 From: Lynne Date: Thu, 30 May 2019 20:32:05 +1000 Subject: [PATCH] fixed 401 error --- gen.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gen.py b/gen.py index 421084e..e5894ef 100755 --- a/gen.py +++ b/gen.py @@ -28,9 +28,11 @@ cfg = json.load(open('config.json', 'r')) toot = create.make_toot() if not args.simulate: - client = Mastodon(client_id = cfg['client']['id'], - client_secret = cfg['client']['secret'], - api_base_url=cfg['site']) + client = Mastodon( + client_id=cfg['client']['id'], + client_secret=cfg['client']['secret'], + access_token=cfg['secret'], + api_base_url=cfg['site']) try: client.status_post(toot, visibility = 'unlisted', spoiler_text = cfg['cw'])