diff --git a/pleroma.py b/pleroma.py index 6b984e7..95c7b78 100644 --- a/pleroma.py +++ b/pleroma.py @@ -27,8 +27,8 @@ class LoginFailed(Exception): class Pleroma: def __init__(self, *, api_base_url, access_token): self.api_base_url = api_base_url.rstrip('/') - self.access_token = access_token - self._session = http_session_factory({'Authorization': 'Bearer ' + access_token}) + self.access_token = access_token.strip() + self._session = http_session_factory({'Authorization': 'Bearer ' + self.access_token}) self._logged_in_id = None async def __aenter__(self):