PHPackages                             cjrasmussen/mastodon-api - 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. cjrasmussen/mastodon-api

ActiveLibrary[API Development](/categories/api)

cjrasmussen/mastodon-api
========================

Simple helper for interacting with Mastodon's API

1.2.2(1y ago)01201MITPHPPHP &gt;=7.4.0

Since Nov 8Pushed 1y ago1 watchersCompare

[ Source](https://github.com/cjrasmussen/MastodonApi)[ Packagist](https://packagist.org/packages/cjrasmussen/mastodon-api)[ Docs](https://cjr.dev)[ RSS](/packages/cjrasmussen-mastodon-api/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (9)Used By (1)

MastodonApi
===========

[](#mastodonapi)

Simple class for making requests to the Mastodon API.

Usage
-----

[](#usage)

```
use cjrasmussen\MastodonApi\MastodonApi;

$mastodon = new MastodonApi($server);

// SEND A TOOT WITH BEARER TOKEN
$mastodon->setBearerToken($bearer_token);
$response = $mastodon->request('POST', 'v1/statuses', ['status' => 'Toot text']);
```

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

[](#installation)

Simply add a dependency on cjrasmussen/mastodon-api to your composer.json file if you use [Composer](https://getcomposer.org/) to manage the dependencies of your project:

```
composer require cjrasmussen/mastodon-api
```

Although it's recommended to use Composer, you can actually include the file(s) any way you want.

License
-------

[](#license)

MastodonApi is [MIT](http://opensource.org/licenses/MIT) licensed.

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Every ~98 days

Recently: every ~108 days

Total

8

Last Release

642d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0225f44837a665c8a143afa50a34a406a769c523dba31e4cdf73fd0530dede45?d=identicon)[cjrasmussen](/maintainers/cjrasmussen)

---

Top Contributors

[![cjrasmussen](https://avatars.githubusercontent.com/u/15007730?v=4)](https://github.com/cjrasmussen "cjrasmussen (14 commits)")

---

Tags

mastodon

### Embed Badge

![Health badge](/badges/cjrasmussen-mastodon-api/health.svg)

```
[![Health](https://phpackages.com/badges/cjrasmussen-mastodon-api/health.svg)](https://phpackages.com/packages/cjrasmussen-mastodon-api)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M20](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k13](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)[revolution/laravel-mastodon-api

Mastodon API for Laravel

2782.2k2](/packages/revolution-laravel-mastodon-api)[surface/laravel-webfinger

A Laravel package to create an ActivityPub webfinger.

114.1k](/packages/surface-laravel-webfinger)

PHPackages © 2026

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