# Using JS-IPFS for ipns name publish

**URL:** <https://discuss.ipfs.tech/t/using-js-ipfs-for-ipns-name-publish/14313>\
**Category:** Help\
**Tags:** js-ipfs, ipns\
**Created:** [May 25, 2022, 6:58am UTC](https://discuss.ipfs.tech/t/using-js-ipfs-for-ipns-name-publish/14313 "2022-05-25T06:58:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![xponent](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/xponent/32/6490_2.png) [@xponent](https://discuss.ipfs.tech/u/xponent)\
**Post date:** [May 25, 2022, 6:58am UTC](https://discuss.ipfs.tech/t/using-js-ipfs-for-ipns-name-publish/14313/1 "2022-05-25T06:58:02Z")

</div>

Hello,

I’m very much an intermediate coder, so please keep that in mind when offering any potential help. I’m trying to use js-ipfs to both simply add a file via my infura, which it does successfully, then use name publish, which is giving me an error. Any help would be greatly appreciated.

The error message that I get is “Uncaught HTTPError HTTPError: ipfs method not supported.”

```auto
import { create } from 'ipfs-http-client';
import fs from 'fs';

const infuraId = "<my ID>";
const infuraSecret = "<my secret>";
const auth =
    `Basic ${Buffer.from(infuraId + ':' + infuraSecret).toString('base64')}`;

const client = create({
    host: 'ipfs.infura.io',
    port: 5001,
    protocol: 'https',
    headers: {
        authorization: auth,
    },
});

try {
    fs.readFile("NodejsConsoleApp1/index.html", (error, data) => {
        if(error) throw error;
        client.add(data).then((res) => {
            client.name.publish(res.path).then(value => {
                console.log(`https://gateway.ipfs.io/ipns/${value.name}`);
            })
        });
    });
} catch (error) {
    
}

```

---

<div class="post-metadata">

**Author:** ![tknoch](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/tknoch/32/6906_2.png) [@tknoch](https://discuss.ipfs.tech/u/tknoch)\
**Post date:** [September 6, 2022, 7:40am UTC](https://discuss.ipfs.tech/t/using-js-ipfs-for-ipns-name-publish/14313/2 "2022-09-06T07:40:25Z")

</div>

Infura does not support IPNS
