Una semplicissima API PHP Mastodon per l'invio di status/toot https://mastodon.uno
Go to file
Grimstack 4b0405d4ce
Merge pull request #10 from edent/patch-1
Better error handling
2023-05-30 20:32:26 +02:00
examples Apply fixes from StyleCI 2022-12-17 17:51:20 +00:00
LICENSE Initial commit 2020-04-10 21:36:45 +02:00
Mastodon.php Better error handling 2023-05-09 09:59:05 +01:00
README.md Fix repo url styleCi in Readme 2022-12-17 18:54:13 +01:00
composer.json Fix composer package name 2020-04-10 21:54:38 +02:00




Total Downloads License StyleCI

A very simple PHP Mastodon API for sending statuses


  • PHP >= 5.3
  • Curl extension for PHP5 must be enabled.
  • A Mastodon Application Client token. From Settings -> Development -> NEW APPLICATION enter a name and select the permissions, you will need write:media to upload media files and write:statuses to publish statuses. "Your access token" contains the token.
  • Some way to execute the script in order to serve messages (for example https://cron-job.org/)


Using Composer

From your project directory, run:

composer require eleirbag89/mastodonbotphp


php composer.phar require eleirbag89/mastodonbotphp

Note: If you don't have Composer you can download it HERE.

Using release archives


Using Git

From a project directory, run:

git clone https://github.com/Eleirbag89/MastodonBotPHP.git


Via Composer's autoloader

After downloading by using Composer, you can include Composer's autoloader:

include (__DIR__ . '/vendor/autoload.php');

$mastodon = new Mastodon('YOUR APP TOKEN HERE', 'YOUR INSTANCE URL HERE');

Via Mastodon class

Copy Mastodon.php into your server and include it in your new bot script:

include 'Mastodon.php';

$mastodon = new Mastodon('YOUR APP TOKEN HERE', 'YOUR INSTANCE URL HERE');


This open-source software is distributed under the MIT License. See LICENSE.md


All kinds of contributions are welcome - code, tests, documentation, bug reports, new features, etc...

  • Send feedbacks.
  • Submit bug reports.
  • Write/Edit the documents.
  • Fix bugs or add new features.

Contact me

You can contact me via Mastodon Bida but if you have an issue please open one.

Support me

You can support me using via LiberaPay Donate using Liberapay

or buy me a beer or two using Paypal.