Last active
November 30, 2019 17:59
-
-
Save ZiTAL/b25ca56f91d7ec683be81008b84bed74 to your computer and use it in GitHub Desktop.
python: create mastodon credentials file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 | |
) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Erabili behar den fitxategia mastodon.credentials da, bestea ezabatu dezakezue