POST https://ipfs.infura.io:5001/api/v0/add?stream-channels=true&progress=false 401 (Unauthorized)
I’m getting this error while trying to upload a file to IPFS. I have no idea where the error lies.
This is the GitHub repo of complete code
Hi @abhijit69-ui and welcome to the community.
It seems you are not authenticating your request, hence the 401 unauthorized error. Please use your project Id and project secret to authenticate. You can use the below as an example:
curl "https://ipfs.infura.io:5001/api/v0/add?pin=false" \
-X POST \
-u "PROJECT_ID:PROJECT_SECRET" \
-H "Content-Type: multipart/form-data" \
This topic was automatically closed after 30 days. New replies are no longer allowed.