Medium API

Personality / OAuth Advanced HTTPS
Varies by plan (check documentation)

Overview

The Medium API allows developers to publish posts, fetch user profiles, and manage publications on the Medium blogging platform. It uses OAuth 2.0 for authentication, which is a great way to learn industry-standard authorization flows. Note that the API has limited public endpoints — most functionality requires a user token obtained via OAuth.

Beginner Tip

Start by creating an integration token in your Medium settings for quick testing before implementing full OAuth. Use the token as a Bearer token in your Authorization header.

Available Data

Medium data via REST API

Example Response

JSON Response
{
  "status": "success",
  "data": {
    "result": "Data from Medium",
    "description": "Community of readers and writers offering unique perspectives on ideas",
    "timestamp": "2025-01-15T10:00:00Z"
  }
}

Field Reference

data.id The unique identifier of the authenticated Medium user.
data.username The user's Medium username (appears in their profile URL).
data.name The user's display name on Medium.
data.url Full URL to the user's Medium profile page.
data.imageUrl URL of the user's profile avatar image.

Implementation Example

Request
const url = "https://github.com/Medium/medium-api-docs";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
  headers: {
  "Authorization": "Bearer YOUR_API_KEY"
  }
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

401 Unauthorized Missing, expired, or incorrectly formatted Bearer token.
Include the header Authorization: Bearer YOUR_TOKEN and ensure your token has not expired.
403 Forbidden on publication posts Your user account does not have contributor access to the target publication.
Use your personal user ID as the target instead of a publication ID, or request contributor access.
400 Bad Request on POST /users/:id/posts The contentFormat field is invalid or the content field is empty.
Set contentFormat to "html" or "markdown" and provide a non-empty content string.

Metadata Score Breakdown

Estimated from metadata — endpoint not independently tested

This score is estimated from observable metadata — HTTPS support, authentication model, declared CORS, and documentation reachability — because the API requires authentication or exposes no publicly testable endpoint. The five-signal breakdown is only shown for live-tested APIs.

Metadata estimate · endpoint not independently tested

Technical Specifications

Auth OAuth
HTTPS REQUIRED
CORS UNKNOWN
Category Personality
Difficulty Advanced
Verified: 2026-04-04

Similar APIs

View All →