Curl "https://ipfs.infura.io:5001/api/v0/add" telling me project id required

Im trying to follow this article on how to upload NFT metadata to IPFS.
I ran this code in my terminal
curl “https://ipfs.infura.io:5001/api/v0/add
-X POST
-F file=@“meme-nft.jpeg”
-u “:”

replacing the file name with my actual file name and api-key and api-key-secret with the api keys of the newly created ipfs project I made.
This is what I see in my terminal after running

project id required
curl: (3) URL using bad/illegal format or missing URL
curl: (6) Could not resolve host: POST
curl: (3) URL using bad/illegal format or missing URL
curl: (6) Could not resolve host: test-img.png
curl: (3) URL using bad/illegal format or missing URL
curl: (3) URL using bad/illegal format or missing URL

Can someone tell me what Im doing wrong? I followed exactly what the docs said (or at least I think I did)

1 Like

hey, it looks like a formatting issue, are you running this on Windows ? Try to make it a single line commend and see how it goes, ex:

curl "https://ipfs.infura.io:5001/api/v0/add" -X POST -F file=@"meme-nft.jpeg" -u "<API-Key>:<API-Key-Secret>"

1 Like

This topic was automatically closed after 30 days. New replies are no longer allowed.