Skip to content

Instantly share code, notes, and snippets.

@ZiTAL
Last active November 30, 2019 17:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ZiTAL/b25ca56f91d7ec683be81008b84bed74 to your computer and use it in GitHub Desktop.
Save ZiTAL/b25ca56f91d7ec683be81008b84bed74 to your computer and use it in GitHub Desktop.
python: create mastodon credentials file
# pip3 install mastodon.py
from mastodon import Mastodon
instance = 'https://botsin.space'
user = 'user@mail.com'
passwd = 'passwd'
file_secret = 'mastodon.secret'
file_credentials = 'mastodon.credentials'
Mastodon.create_app(
'app_name',
api_base_url = instance,
to_file = file_secret
)
mastodon = Mastodon(
client_id = file_secret,
api_base_url = instance
)
mastodon.log_in(
user,
passwd,
to_file = file_credentials
)
@ZiTAL
Copy link
Author

ZiTAL commented Nov 28, 2019

Erabili behar den fitxategia mastodon.credentials da, bestea ezabatu dezakezue

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