Pouvoir faire de la planification de posts de plusieurs comptes mastodon en créant une app pour chacun d'eux dans son compte masto, et en reportant les accès dans un fichier d'environnement de cette app nodejs.
Go to file
2022-07-10 22:38:47 +02:00
.idea init db 2022-07-07 19:03:04 +02:00
assets hop, ajout a la file d'attente de messages 2022-07-10 22:38:47 +02:00
bin hop 2022-07-07 18:23:44 +02:00
public/stylesheets lister les messages en bdd 2022-07-07 19:28:40 +02:00
routes hop, ajout a la file d'attente de messages 2022-07-10 22:38:47 +02:00
views hop, ajout a la file d'attente de messages 2022-07-10 22:38:47 +02:00
.env.example hop 2022-07-07 18:23:44 +02:00
.gitignore create db ok 2022-07-07 19:16:56 +02:00
app.js hop 2022-07-07 18:23:44 +02:00
mastodon_multi_accounts.db hop, ajout a la file d'attente de messages 2022-07-10 22:38:47 +02:00
package.json can publish pictures 2022-07-07 23:39:28 +02:00
README.md can publish pictures 2022-07-07 23:39:28 +02:00
yarn.lock can publish pictures 2022-07-07 23:39:28 +02:00

Mastodon Multi account posting

Permet de poster sur mastodon selon le compte que l'on souhaite

curl auth

curl -X POST \
-F 'client_name=Test Application' \
-F 'redirect_uris=urn:ietf:wg:oauth:2.0:oob' \
-F 'scopes=read write follow push' \
-F 'website=https://mastodon.cipherbliss.com' \
https://mastodon.cipherbliss.com/api/v1/apps

curl -X POST \
-F 'client_id=PuZ8Eg_2WWutiK4Cafs7mx3FIL4_SugQPSFgdC7Qq1I' \
-F 'client_secret=GXlQI_DQAgLR7TgdVXifmpq7zITa7ye4V7Wj2gzaxiU' \
-F 'redirect_uri=urn:ietf:wg:oauth:2.0:oob' \
-F 'grant_type=client_credentials' \
https://mastodon.cipherbliss.com/oauth/token


curl \
	-H 'Authorization: Bearer 7Z8EJZCWvzyybl_L5BCRP3PGDTtH4Jd_-jDUQEYmYDc' \
	https://mastodon.cipherbliss.com/api/v1/apps/verify_credentials
	

{"id":"1054","name":"Test Application","website":"https://mastodon.cipherbliss.com","redirect_uri":"urn:ietf:wg:oauth: 2.0:oob","client_id":"SgVTsRjDTbORQnk2iYXbZ8csIFsKJXR8Aahz_h1y44A","client_secret":" IeeLHtBsyR97i8wGoL6TP2O0Go7KixfBZ350ks71hIQ","vapid_key":" BEceqzZx0tYD_rY4PyN8Py9cmhsrcSlF7a3Hr26PqL1FPZuWQSN-29-EyWSx0A3mdR22ETgUkHOYIuEtDUcQvMw="}

{"access_token":"7Z8EJZCWvzyybl_L5BCRP3PGDTtH4Jd_-jDUQEYmYDc","token_type":"Bearer","scope":"read","created_at":1657227222}

{"name":"greeting bot","website":null,"vapid_key":"BEceqzZx0tYD_rY4PyN8Py9cmhsrcSlF7a3Hr26PqL1FPZuWQSN-29-EyWSx0A3mdR22ETgUkHOYIuEtDUcQvMw="}