Please help with 'Invalid project id'

i added my id and made request: but response is invalid project id: why?

curl -X POST -H "Content-Type: application/json" --data
'{"jsonrpc": "2.0", "id": 1, "method": "eth_blockNumber", "params": []}' 
https://mainnet.infura.io/v3/eee6e4d410c247dea2a8f21c3f8817ae

my project has exactly this id! https://infura.io/dashboard/ethereum/eee6e4d410c247dea2a8f21c3f8817ae/settings

Hi @95pz_aru - welcome to the Infura community! When I try to replicate the error with your project id above, I get an error message that user project is inactive.

I would suggest creating a new project with a new project ID, and then following the curl example from our docs - try putting the URL just after curl.

Let us know if this helps!

1 Like

I’m having the exact same problem. I created a brand new project, and I get this:

curl https://mainnet.infura.io/v3/9a86d4e3c92e4aeda17beb2e9bd050d9 -X POST -H “Content-Type: application/json” -d ‘{“jsonrpc”:“2.0”,“method”:“eth_blockNumber”,“params”: [],“id”:1}’

invalid project id

Hi @tasd, and welcome to the Infura community!

I would triple check that the project ID you’ve included is correct. If you’re still getting the error, I would recommend creating a new project ID and starting from there, as the curl request is properly set up.

Hi Leiya, thanks for the quick response!
I did exactly that. I’ve created 3 different projects now, and very carefully copied/pasted/checked the ID. None of them have worked. Here is the latest one:

tas@ribeye:~$ curl https://mainnet.infura.io/v3/d2c7be9512d244a8908dce72a4a64f26 -X POST -H “Content-Type: application/json” -d ‘{“jsonrpc”:“2.0”,“method”:“eth_blockNumber”,“params”: [],“id”:1}’

invalid project id

I m having the same issue, an old project which I had created a few weeks ago, was working correctly. I deleted it though, I completely regret that :joy:

If it is of any help it is still working with the deleted project id!

I’m having the same issue and am using the copy button on the project settings page so there’s no way it’s being entered incorrectly. I tried this with multiple projects and networks with the same result.

$ curl https://ropsten.infura.io/v3/<project-id> -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"eth_accounts","params":[],"id":1}'
invalid project id

It’s working now, for me, with old and new project IDs. I guess they fixed it.

1 Like

I am running a ETH2 node and using infura. I started to receive a similar error (temporarily).
There are some other people having similar issues at that time.

time="2020-12-10 15:01:09" level= **error** msg="could not query header with height 11423531: 401 
Unauthorized: invalid project id
time="2020-12-10 15:01:22" level= **error** msg="401 Unauthorized: invalid project id
time="2020-12-10 15:10:56" level= **error** msg="could not query header with height 11423577: 401 
Unauthorized: invalid project id

But it seems like a temporary issue (it was running without any issue since 10 days)

Getting this error as well. Likewise it was a temporary issue. Not sure what it is about

Hi there. @can_bal99 @novo
It was caused by an incident on Infura https://status.infura.io/incidents/snd77v5drglg
It should be fixed now. Can you confirm?