ipfsHttpClient giving Invalid Project ID but only in production build

Hey guys,

I have the ipfsHttpClient set up in the normal way as specified in the docs

const client = ipfsHttpClient({
host: “ipfs.infura.io”,
port: 5001,
protocol: “https”,
headers: {
authorization: auth,

It works fine on my local host and the pinned files show up in my dashboard straight away but when I push the build to production i get:

POST https://ipfs.infura.io:5001/api/v0/add?stream-channels=true&pin=true&progress=false 401 (Unauthorized)
Uncaught (in promise) HTTPError: basic auth failure: invalid project id or project secret

Does anyone know what i am doing wrong?


Hey :wave: @Will_Rankin and welcome to the Infura community!

Would you be able to share with us how you set up auth?
Is your production set up any different?

Please refer to the below: