---
title: "Comment by J W on \"Post to Dev, Hashnode, and Medium using their APIs\" | Hashnode"
description: "I recently did something similar but in Rust. Any chance you found a way to update posts on Medium? Also, were you ever able to get hashnode update to work? It"
url: "https://hashnode.com/posts/post-to-dev-hashnode-and-medium-using-their-apis/60eddc7cfc37a15ec1568dbd/comment/60efce487d1ba0644913a580"
---

[Discussion](https://hashnode.com/posts/post-to-dev-hashnode-and-medium-using-their-apis/60eddc7cfc37a15ec1568dbd)

Comment [Post to Dev, Hashnode, and Medium using their APIs](https://hashnode.com/posts/post-to-dev-hashnode-and-medium-using-their-apis/60eddc7cfc37a15ec1568dbd)

[J W](https://hashnode.com/@jeikabu)

[Jul 15, 2021](https://hashnode.com/posts/post-to-dev-hashnode-and-medium-using-their-apis/60eddc7cfc37a15ec1568dbd/comment/60efce487d1ba0644913a580)

I [recently did something similar](https://rendered-obsolete.hashnode.dev/yet-another-snazzy-rust-cli) but in Rust. Any chance you found a way to update posts on Medium? Also, were you ever able to get hashnode update to work? It always returns `502 bad gateway` whenever I try.

[Cody Bontecou](https://hashnode.com/@codybontecou)

[Jul 15, 2021](https://hashnode.com/posts/post-to-dev-hashnode-and-medium-using-their-apis/60eddc7cfc37a15ec1568dbd/comment/60efce487d1ba0644913a580#reply-60efdba523b128642163c36c)

Awesome, great minds think alike :). I actually haven't delved into their update functionality, I'll dig around and see if I can get it to work.

[Cody Bontecou](https://hashnode.com/@codybontecou)

[Jul 15, 2021](https://hashnode.com/posts/post-to-dev-hashnode-and-medium-using-their-apis/60eddc7cfc37a15ec1568dbd/comment/60efce487d1ba0644913a580#reply-60efe0c77d1ba0644913a862)

What did you pass for isPartOfPublication parameter?

EDIT: Scratch that, the following query got me the isPartOfPublication.publicationID:

```
{
  post(slug: <slug>, hostname: <hostname>){
    _id
    partOfPublication
    publication {
      _id
    }
  }
}
```

[Cody Bontecou](https://hashnode.com/@codybontecou)

[Jul 15, 2021](https://hashnode.com/posts/post-to-dev-hashnode-and-medium-using-their-apis/60eddc7cfc37a15ec1568dbd/comment/60efce487d1ba0644913a580#reply-60efe61d23b128642163c558)

Okay, I think I'm reaching a similar/same brick wall as you.

It takes around 1 minute to get a response back, and the response states:

```
FetchError: invalid json response body at https://api.hashnode.com/ reason: Unexpected token B in JSON at position 4
```

Inspecting the dev console shows me the 502 error as well...

[J W](https://hashnode.com/@jeikabu)

[Jul 15, 2021](https://hashnode.com/posts/post-to-dev-hashnode-and-medium-using-their-apis/60eddc7cfc37a15ec1568dbd/comment/60efce487d1ba0644913a580#reply-60efefca23b128642163c6a0)

[Cody Bontecou](https://hashnode.com/@codybontecou) bugger, has hoped I was just doing something foolish with GraphQL. There's a few problems with their API- even got a server callstack once. Tried contacting them via hello@hashnode (or was it help@?) and never got a reply. Oh, well...

[Cody Bontecou](https://hashnode.com/@codybontecou)

[Jul 16, 2021](https://hashnode.com/posts/post-to-dev-hashnode-and-medium-using-their-apis/60eddc7cfc37a15ec1568dbd/comment/60efce487d1ba0644913a580#reply-60f13a9319e3e845d50d119c)

[J W](https://hashnode.com/@jeikabu) Shoot, any word back from Hashnode?

[J W](https://hashnode.com/@jeikabu)

[Jul 16, 2021](https://hashnode.com/posts/post-to-dev-hashnode-and-medium-using-their-apis/60eddc7cfc37a15ec1568dbd/comment/60efce487d1ba0644913a580#reply-60f1466d303c5845ab8cb0ec)

[Cody Bontecou](https://hashnode.com/@codybontecou) newp
