I am trying to publish an IPNS name (i.e. publish an IPFS object to IPNS) using the HTTP API, but I keep getting an error. Documentation link
curl -X POST “http://127.0.0.1:5001/api/v0/name/publish?**arg=‘/ipfs/QmZCDSGV7PRJjRb2PFyopKzsU79LgmPo7AziaB89XFXyP3’”**
{“Message”:“invalid path "‘/ipfs/QmZCDSGV7PRJjRb2PFyopKzsU79LgmPo7AziaB89XFXyP3’": cid too short”,“Code”:0,“Type”:“error”}
Tried modifying the argument by removing the ‘/ipfs/’ part, but get a different error now.
curl -X POST “http://127.0.0.1:5001/api/v0/name/publish?**arg=‘QmZCDSGV7PRJjRb2PFyopKzsU79LgmPo7AziaB89XFXyP3’”**
{“Message”:“invalid path "‘QmZCDSGV7PRJjRb2PFyopKzsU79LgmPo7AziaB89XFXyP3’": selected encoding not supported”,“Code”:0,“Type”:“error”}
When I use the CLI it works just fine.
ipfs name publish /ipfs/QmZCDSGV7PRJjRb2PFyopKzsU79LgmPo7AziaB89XFXyP3
Published to k51qzi5uqu5dmhtzin0shoviap3jncuk82n0hui6kr1juhhwbigr0535kdlk11: /ipfs/QmZCDSGV7PRJjRb2PFyopKzsU79LgmPo7AziaB89XFXyP3
Couldn’t find anybody talking about this anywhere when I looked online. Any solutions are appreciated!!
Thank you!!