Mr_Tai
August 12, 2022, 2:33pm
#1
Now i try to make website by html and javascript .
how can i get IPFS url of image by dedicated gateway.
i used to use public infura like this
const IPFS_URL = “https://ipfs.io/ipfs/ ”;
const IPFS_API_URL = “ipfs.infura.io ”;
const ipfs = window.IpfsApi(IPFS_API_URL, “5001”, { protocol: “https” }); // Connect to IPFS
but now it is not working so i made dedicated gateway but i don’t know how it use.
my dedicated gateway = https://benjaminkor2.infura-ipfs.io
Plz some one tell me how it use.
APDAN
August 12, 2022, 7:01pm
#2
Hey @Mr_Tai
Thanks for bringing this to our attention. Lets modify only the ipfs_url. The ipfs_api_url stays the same. Your updated code should look like this:
const IPFS_URL = “https://benjaminkor2.infura-ipfs.io/ipfs/”;
const IPFS_API_URL = “ipfs.infura.io ”;
const ipfs = window.IpfsApi(IPFS_API_URL, “5001”, { protocol: “https” }); // Connect to IPFS
Mr_Tai
August 13, 2022, 12:17am
#3
Thank you i tryed it . but after it they show me that error
POST https://ipfs.infura.io:5001/api/v0/add?stream-channels=true 401 (Unauthorized)
Could you tell me what should i do?
Mr_Tai
August 13, 2022, 12:38am
#5
Thank you i tryed it . but after it they show me that error
POST https://ipfs.infura.io:5001/api/v0/add?stream-channels=true 401 (Unauthorized)
Can you please mention , How ? I am also getting same error:
POST https://ipfs.infura.io:5001/api/v0/add?stream-channels=true 401 (Unauthorized)
APDAN
August 25, 2022, 7:47pm
#8
@Shubham_Singh your requests must be authenticated now with your Infura IPFS dashboard’s API key and ID. Can you please provide a snippet of your code? We can take a look at it.
Kind regards,
Alex | Infura Support