PHPackages                             eleirbag89/mastodonbotphp - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. eleirbag89/mastodonbotphp

ActiveLibrary[API Development](/categories/api)

eleirbag89/mastodonbotphp
=========================

A very simple PHP Mastodon API for sending statuses

v0.1(6y ago)295.8k—7.5%5[1 PRs](https://github.com/Eleirbag89/MastodonBotPHP/pulls)MITPHPPHP &gt;=5.0

Since Apr 10Pushed 2y ago2 watchersCompare

[ Source](https://github.com/Eleirbag89/MastodonBotPHP)[ Packagist](https://packagist.org/packages/eleirbag89/mastodonbotphp)[ RSS](/packages/eleirbag89-mastodonbotphp/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (3)Used By (0)

MastodonBotPHP
==============

[](#mastodonbotphp)

[![PHP](https://camo.githubusercontent.com/7001dc230291c2a963ca66407574a82f5dfef7c1a7ab0b0356a4f4818a2ca106/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344352e332d3838393262662e737667)](https://camo.githubusercontent.com/7001dc230291c2a963ca66407574a82f5dfef7c1a7ab0b0356a4f4818a2ca106/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344352e332d3838393262662e737667)[![CURL](https://camo.githubusercontent.com/f5a3b595480ac21ec43e745984c47d97fcc96f430547805750cd31928d67b28f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6355524c2d72657175697265642d677265656e2e737667)](https://camo.githubusercontent.com/f5a3b595480ac21ec43e745984c47d97fcc96f430547805750cd31928d67b28f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6355524c2d72657175697265642d677265656e2e737667)

[![Total Downloads](https://camo.githubusercontent.com/53586898a2b8976b6bb6357218424380679ac0ae85bb12bcdf94405e40c3919a/68747470733a2f2f706f7365722e707567782e6f72672f656c65697262616738392f6d6173746f646f6e626f747068702f646f776e6c6f616473)](https://packagist.org/packages/eleirbag89/mastodonbotphp)[![License](https://camo.githubusercontent.com/bf533d9c68c5ebe370288902b77643165c53136e83e4cc55902a29c5f5308faf/68747470733a2f2f706f7365722e707567782e6f72672f656c65697262616738392f6d6173746f646f6e626f747068702f6c6963656e7365)](https://packagist.org/packages/eleirbag89/mastodonbotphp)[![StyleCI](https://camo.githubusercontent.com/729ff234b918cfc03f9b7ef24f92a0741bd7474b67fed319bd44b5bf7a6336e3/68747470733a2f2f7374796c6563692e696f2f7265706f732f3235343732303335322f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/254720352)

A very simple PHP Mastodon API for sending statuses

Requirements
------------

[](#requirements)

- PHP &gt;= 5.3
- Curl extension for PHP5 must be enabled.
- A Mastodon Application Client token. From Settings -&gt; Development -&gt; 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 )

Download
--------

[](#download)

#### Using Composer

[](#using-composer)

From your project directory, run:

```
composer require eleirbag89/mastodonbotphp

```

or

```
php composer.phar require eleirbag89/mastodonbotphp

```

Note: If you don't have Composer you can download it [HERE](https://getcomposer.org/download/).

#### Using release archives

[](#using-release-archives)

#### Using Git

[](#using-git)

From a project directory, run:

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

```

Installation
------------

[](#installation)

#### Via Composer's autoloader

[](#via-composers-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

[](#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');
```

License
-------

[](#license)

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

Contributing
------------

[](#contributing)

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
----------

[](#contact-me)

You can contact me [via Mastodon Bida](https://mastodon.bida.im/@eleirbag) but if you have an issue please [open](https://github.com/Eleirbag89/MastodonBotPHP/issues) one.

Support me
----------

[](#support-me)

You can support me using via LiberaPay [![Donate using Liberapay](https://camo.githubusercontent.com/f42d4c8650291eed95d5feb7658604d653ad107d3308fb7e8f269623d7ed65cf/68747470733a2f2f6c69626572617061792e636f6d2f6173736574732f776964676574732f646f6e6174652e737667)](https://liberapay.com/eleirbag89/donate)

or buy me a beer or two using [Paypal](https://paypal.me/eleirbag89).

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity35

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 69.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2229d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ebdc5a57730d3d016e954bb0959856658a2849966c818ca2d170ec1de888a687?d=identicon)[Eleirbag89](/maintainers/Eleirbag89)

---

Top Contributors

[![Eleirbag89](https://avatars.githubusercontent.com/u/10547598?v=4)](https://github.com/Eleirbag89 "Eleirbag89 (9 commits)")[![sbsatwork](https://avatars.githubusercontent.com/u/97030650?v=4)](https://github.com/sbsatwork "sbsatwork (2 commits)")[![edent](https://avatars.githubusercontent.com/u/837136?v=4)](https://github.com/edent "edent (1 commits)")[![StyleCIBot](https://avatars.githubusercontent.com/u/11048387?v=4)](https://github.com/StyleCIBot "StyleCIBot (1 commits)")

### Embed Badge

![Health badge](/badges/eleirbag89-mastodonbotphp/health.svg)

```
[![Health](https://phpackages.com/badges/eleirbag89-mastodonbotphp/health.svg)](https://phpackages.com/packages/eleirbag89-mastodonbotphp)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[facebook/php-business-sdk

PHP SDK for Facebook Business

90821.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

74513.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

265103.1M454](/packages/google-gax)[google/common-protos

Google API Common Protos for PHP

173103.7M50](/packages/google-common-protos)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
