Skip to content

login.py fails with Plerom after secret is entered #39

Description

@utzer

After copying the secret over from Pleroma to command line where I started login.py I get this error:
Traceback (most recent call last):

  File "/home/utzer/.local/lib/python3.10/site-packages/mastodon/Mastodon.py", line 525, in log_in
    response = self.__api_request('POST', '/oauth/token', params, do_ratelimiting=False)
  File "/home/utzer/.local/lib/python3.10/site-packages/mastodon/Mastodon.py", line 3425, in __api_request
    raise ex_type(
mastodon.Mastodon.MastodonAPIError: ('Mastodon API returned error', 400, 'Bad Request', 'Invalid credentials')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/utzer/ocrbot/login.py", line 66, in <module>
    cfg['secret'] = client.log_in(code=input("Secret: "), scopes=scopes)
  File "/home/utzer/.local/lib/python3.10/site-packages/mastodon/Mastodon.py", line 533, in log_in
    raise MastodonIllegalArgumentError('Invalid access token or redirect_uris: %s' % e)
mastodon.Mastodon.MastodonIllegalArgumentError: Invalid access token or redirect_uris: ('Mastodon API returned error', 400, 'Bad Request', 'Invalid credentials')

Wondering if there is any tip why the connection fails.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions