I was trying to use Infura’s IPFS nodes with OrbitDB (a decentralised database that stores structured data on IPFS).
Thing is, using OrbitDB to access IPFS data results in 403 (Unauthorised), but using a local IPFS node causes no issues.
Here’s what I’ve been trying:
const IPFSClient = require("ipfs-http-client");
const ipfsClient = IPFSClient.create({
url: "INFURA ENDPOINT",
headers: {
authorization: "Basic <base64(PROJECT_ID:PROJECT_SECRET)>"
}
});
const orbitDb = await OrbitDb.createInstance(ipfsClient); // Errors here
What’s wrong?