2022-07-07 18:23:44 +02:00
|
|
|
# Mastodon Multi account posting
|
2022-07-07 23:39:28 +02:00
|
|
|
|
2022-07-07 18:23:44 +02:00
|
|
|
Permet de poster sur mastodon selon le compte que l'on souhaite
|
2022-07-07 23:39:28 +02:00
|
|
|
|
|
|
|
# curl auth
|
|
|
|
|
|
|
|
```bash
|
|
|
|
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="}
|