Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to retrieve Medium stories for a user from the API?

Tags:

medium.com

I'm trying to integrate Medium blogging into an app by showing some cards with posts images and links to the original Medium publication.

From Medium API docs I can see how to retrieve publications and create posts, but it doesn't mention retrieving posts. Is retrieving posts/stories for a user currently possible using the Medium's API?

like image 213
Tomas Romero Avatar asked Mar 19 '16 03:03

Tomas Romero


People also ask

Is there an API for medium?

The answer is yes. Medium's API is a JSON-based OAuth2 API. All requests are made to endpoints beginning: https://api.medium.com/v1 and all requests must be secure, i.e. https , not http. We can interact with the Medium Api using the programming language of our choice solely to get the data we are interested in.

How do I get medium API?

Get user Id Go to browser and put GET https://api.medium.com/v1/me?accessToken={token} . You will get your userId in browser. We programmers, don't like to do things manually, especially if it has GUI interface. Or is it just me?


1 Answers

The API is write-only and is not intended to retrieve posts (Medium staff told me)

You can simply use the RSS feed as such:

https://medium.com/feed/@your_profile 

You can simply get the RSS feed via GET, then if you need it in JSON format just use a NPM module like rss-to-json and you're good to go.

like image 53
Antonio Brandao Avatar answered Sep 18 '22 12:09

Antonio Brandao