API medium Blog posts

Dear Wappler team,

I am trying to call Medium service to post from wappler a blog entry. the Documentation from Medium for their API is : Creates a post on the authenticated user’s profile.

POST https://api.medium.com/v1/users/{{authorId}}/posts

Where authorId is the user id of the authenticated user.

Example request:

POST /v1/users/5303d74c64f66366f00cb9b2a94f3251bf5/posts HTTP/1.1
Host: api.medium.com
Authorization: Bearer 181d415f34379af07b2c11d144dfbe35d
Content-Type: application/json
Accept: application/json
Accept-Charset: utf-8

{
  "title": "Liverpool FC",
  "contentFormat": "html",
  "content": "<h1>Liverpool FC</h1><p>You’ll never walk alone.</p>",
  "canonicalUrl": "http://jamietalbot.com/posts/liverpool-fc",
  "tags": ["football", "sport", "Liverpool"],
  "publishStatus": "public"
}

image

I am receiving the following error when i am trying to send a post :
{“errors”:[{“message”:“No content specified.”,“code”:2002}]}

So from what i can understand i must send in html format the body of the post to the content filed . Can someone help me?

Regards

Nora

Hi.
Try using a service like https://beeceptor.com/ to identify what data is exactly being sent. That should help you debug any incorrect bindings etc. Just create a endpoint and set that as URL in API action.

Hi, I am having the same issue. Did you manage to solve it? Can you please share the solution? @antcas2016

You should send them in the request body as json encoded data. You might be sending them as query parameters, thats why you are getting this error