Infura project url

Hi,

I have made a project in infura. its end point is rinkeby url rinkeby.infura.io/v3/dce50af7b3a347ada43267d2bb80b5b2 but whenever i am using this in my ethereum code, it is giving me error.
error: UnhandledPromiseRejectionWarning: ReferenceError: account is not defined
and when i m using https://rinkeby.infura.io/v3/dce50af7b3a347ada43267d2bb80b5b2
error:Couldn’t connect to node
and if i m entering this url in google- then 404 error.

what i am doing wrong?
please suggest.

Hi, Welcome to the Infura community!

Could you provide the code you are using to generate the requests?

const HDWalletProvider = require(“truffle-hdwallet-provider”);
const Web3 = require(“web3”);
const { interface, bytecode } = require("./compile");

const provider = new HDWalletProvider(
“mnemonic”,
https://rinkeby.infura.io/v3/dce50af7b3a347ada43267d2bb80b5b2
);
const web3 = new Web3(provider);
console.log(“shruti…”);
//try {
const deploy = async () => {
const accounts = await web3.eth.getAccounts();
// console.log(“attempting to deploy from accounts”, account[0]);
const result = await new web3.eth.Contract(JSON.parse(interface))
.deploy({ data: bytecode, arguments: [“Hi there!”] })
.send({ gas: “1000000”, from: accounts[0] });

console.log(“tandon”);
// console.log(“attempting to deploy from account”, getAccounts[0]);
//const result = await new web3.eth.Contract(JSON.parse(interface))
// .deploy({ data: “0x” + bytecode })
// .send({ from: accounts[0] });

console.log(interface);
console.log(“contract deploed to”, result.options.address);
};

deploy();

I tested your provided API key and it is functioning as expected, this could be an issue with how you are executing Web3.js. Does the deploying account have sufficient Rinkeby ether to deploy the contract?