diff --git a/mastodon/api.py b/mastodon/api.py index 42b863f4..bd786d9d 100644 --- a/mastodon/api.py +++ b/mastodon/api.py @@ -434,6 +434,7 @@ def obtain_token(site, request, code): "client_id": mast_app.client_id, "client_secret": mast_app.client_secret, "redirect_uri": redirect_uri, + "scope": settings.MASTODON_CLIENT_SCOPE, "grant_type": "authorization_code", "code": code, } @@ -449,7 +450,6 @@ def obtain_token(site, request, code): ) try: response = post(url, data=payload, headers=headers, auth=auth) - # {"token_type":"bearer","expires_in":7200,"access_token":"VGpkOEZGR3FQRDJ5NkZ0dmYyYWIwS0dqeHpvTnk4eXp0NV9nWDJ2TEpmM1ZTOjE2NDg3ODMxNTU4Mzc6MToxOmF0OjE","scope":"block.read follows.read offline.access tweet.write users.read mute.read","refresh_token":"b1pXbGEzeUF1WE5yZHJOWmxTeWpvMTBrQmZPd0czLU0tQndZQTUyU3FwRDVIOjE2NDg3ODMxNTU4Mzg6MToxOnJ0OjE"} if response.status_code != 200: logger.warning(f"Error {url} {response.status_code}") return None, None