PHPackages                             gsmpopovic/medium-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. gsmpopovic/medium-api

ActiveLibrary[API Development](/categories/api)

gsmpopovic/medium-api
=====================

A simple PHP SDK to interact with the Medium API, through the official API, and a 3rd-party

v1.0.0(3y ago)05MITPHPPHP &gt;=7.4

Since Aug 19Pushed 2y ago2 watchersCompare

[ Source](https://github.com/gsmpopovic/MediumApi)[ Packagist](https://packagist.org/packages/gsmpopovic/medium-api)[ RSS](/packages/gsmpopovic-medium-api/feed)WikiDiscussions master Synced 1mo ago

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

MediumApi
=========

[](#mediumapi)

A small PHP SDK to interact with Medium's API, both through a 3rd-party API via RapidApi (), and Medium's official REST API (), where the former fills in the gaps of the latter (e.g., allowing a user to obtain their own posts).

At Packagist:

Install using Composer:

```
composer require gsmpopovic/medium-api

```

Setup:

1. Install via Composer.

```
composer require gsmpopovic/medium-api

```

2. Add .env variables:

```
RAPID_API_MEDIUM_API_KEY= xxx
RAPID_API_MEDIUM_API_HOST= xxx
MEDIUM_USER_NAME= xxx

OFFICIAL_MEDIUM_API_ACCESS_TOKEN= xxx
OFFICIAL_MEDIUM_API_VERSION=v1

```

3. Use classes in your code, as per the example files.

---

NB:

To interact with the official API, you must generate an access token.

All credentials should be set as environment variables, but, barring this, can be manually assigned to the client as properties.

Examples of API usage can be found in the src/examples directory, both for the official Medium API, and 3rd party Rapid API.

e.g.,

```
// Official Medium API Use cases

require_once "../MediumApi.php";
require_once "../Env.php";
require_once "../Request.php";

// or, if you're using composer, and have installed this package

require "vendor/autoload.php";

use gsmpopovic\MediumApi\MediumApi;
use gsmpopovic\MediumApi\Env;
use gsmpopovic\MediumApi\Request;

/*
You should only load the .env
if it hasn't already been loaded elsewhere, as in Laravel.
*/
$path = dirname(__DIR__, 1) . DIRECTORY_SEPARATOR . ".env";

$env = new Env($path);

$env->load();

$api = new MediumApi(new Request());

$api->getUser();

```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity47

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

Unknown

Total

1

Last Release

1367d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8b0528f5b7d888b88c0ad882ecd942d9580262c4c4b7d2a63883d4e4bad70f82?d=identicon)[gsmpopovic](/maintainers/gsmpopovic)

---

Top Contributors

[![gsmpopovic](https://avatars.githubusercontent.com/u/67986283?v=4)](https://github.com/gsmpopovic "gsmpopovic (59 commits)")

### Embed Badge

![Health badge](/badges/gsmpopovic-medium-api/health.svg)

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

###  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)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

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

PHP wrapper for the Meilisearch API

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

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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